简体   繁体   中英

IBM Cloud API: How can I get the IAM-id of an IBM ID/user?

I am trying to create a new account in my IBM Cloud Enterprise hierarchy by using the IBM Cloud API: https://cloud.ibm.com/apidocs/enterprise-apis/enterprise#create-a-new-account-in-an-enterprise .

It requests to provide the account owner: owner_iam_id (The IAM ID of the account owner, such as IBMid-0123AB). I used an email to create the IBM id, how can I get the IAM ID associated to that user?

You can get the IAM id via the IBM Cloud UI or the ibmcloud CLI:

  • UI
  1. Sign into https://cloud.ibm.com/ and click on Manage drop down menu
  2. Click on Access (IAM)
  3. Click on Users on left list
  4. Click on the user you want to get the IAM id
  5. Click on Details on top left corner and the IAM id should appear

用户详情

  • ibmcloud CLI
  1. Install jwt-cli to decode contents of token.
    $ npm install -g jwt-cli
  2. Use your favorite way to log into ibmcloud CLI, here is one way.
    $ ibmcloud login --sso
  3. Get the token for your active session.
    $ ibmcloud iam oauth-tokens
  4. Decode contents of your token (Omit the string Bearer).
    $ jwt <TOKEN_FROM_STEP_3

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM