title: Get Google Cloud Project Number using its Id
body: <p>I have Google Cloud Service account and projectId and want to get projectNumber programmatically from Java.</p>
  
  <p><a href="https://i.stack.imgur.com/V8aQt.png" rel="noreferrer"><img src="https://i.stack.imgur.com/V8aQt.png" alt="enter image description here"></a></p>
  
  <p>How can I get it?</p>
  
  <p>Basically I have Service Account and want to use it for granting role "roles/storage.legacyBucketWriter" for the account "project-XXXXXXX@storage-transfer-service.iam.gserviceaccount.com" in the Google Cloud Storage Bucket.</p>