ibm-cloud-docs / appid

IBM Cloud App ID documentation
https://cloud.ibm.com/docs/services/appid?topic=appid-gettingstarted#gettingstarted
6 stars 24 forks source link

Role assigned to Application doesn't return in JWT token #388

Closed Timon-iRS closed 1 year ago

Timon-iRS commented 1 year ago

In my backend service, I require a token that contains the "roles" claim in the client credentials flow. So I've tried to setup App ID as described in the article about Assigning roles to an application, unfortunately, I didn't succeed in this. Could you please help me to figure out is it a defect in the documentation or I'm just missing some steps in the setup procedure?

Steps were done for setup:

  1. Register the application with a "regular web application" type
  2. Create a role
  3. Assing role to the application like described in docs
  4. Extend token config with
    "accessTokenClaims": [
    {
      "source": "roles"
    }
    ]
  5. Retrieve token for by Postman Used parameters:
    • URL: https://eu-de.appid.cloud.ibm.com/oauth/v4/{tenantid}/token Body: form data and form data encoded(tried both)
    • grant type: client_credentials;
    • Basic auth: username: client_id; password: client_secret I also tried to use the body with form data and form data encoded(tried both)
    • grant type: client_credentials;
    • client_id: client_id
    • client_secret: client_secret
h-romeus commented 1 year ago

@Timon-iRS Thank you for opening this issue! This is a larger item that we will need to prioritize within our team. I've opened an issue internally that we will use for tracking and will be closing this issue for the time being. I will post here when there is an update available. Please don't hesitate to open additional feedback in the future as we're always looking for ways to improve our documentation.

-Hadassa