AzureAD / microsoft-authentication-library-common-for-android

Common code used by both the Active Directory Authentication Library (ADAL) and the Microsoft Authentication Library (MSAL)
MIT License
41 stars 35 forks source link

incorrect audience in AD Token #2242

Closed maheshwarimrinal closed 10 months ago

maheshwarimrinal commented 11 months ago

Hello,

In android I am getting incorrect audience from my JWT token

I have passed all the scopes {"email","openid","profile","User.Read"}; and my audience should be api://83xxxxxx-xxxx-xxxx-xxxx-xxxxxxc21bbb

Where can I pass my audience scope so that it gets reflected in my JWT token.

Currently I am getting graph token which is not suitable for me 00000003-0000-0000-c000-000000000000

My JSON file includes

{
  "client_id": "83xxxxxx-xxxx-xxxx-xxxx-xxxxxxc21bbb",
  "redirect_uri": "msauth://com.ixxxxxxxxe.sxxxxxxxxz/VxxxxxxxxxxxxD",
  "account_mode": "SINGLE",
  "authorization_user_agent": "WEBVIEW",
  "broker_redirect_uri_registered": false,
  "authorities" : [
    {
      "type": "AAD",
      "audience": {
        "type": "AzureADMyOrg",
        "tenant_id": "7xxxxx-xxxx-xxxx-xxxx-xxxxxxxxd5"
      },
      "default": true
    }
  ]
}

Thanks in advance. Regards,