web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested answer

Unable to get the scope value in Oauth2 token access

(0) ShareShare
ReportReport
Posted on by 1,805

Hello All,

I am trying to generate bearer token from postman. i have provided following values but unable to get scope value. Can anyone please assist in understanding where can i get this value from:

222050.Capture.PNG

I have the same question (0)
  • Sumit Ruhela Profile Picture
    1,805 on at
    RE: Unable to get the scope value in Oauth2 token access

    Just to add one point, I am new to accessing web api. My task is simple to generate the bearer token to call D365 web api.

  • saurabhtiwarii Profile Picture
    on at
    RE: Unable to get the scope value in Oauth2 token access

    Hey John,

    Try to use Grant Type as Implicit as per the documentation here ::

    https://docs.microsoft.com/en-us/powerapps/developer/common-data-service/webapi/setup-postman-environment#connect-with-your-common-data-service-environment

    pastedimage1589653767678v1.png

    Please also ensure that you have Azure AD application registered in order to complete this delegated authentication.

    Walkthrough: Register an app with Azure Active Directory ::

    https://docs.microsoft.com/en-us/powerapps/developer/common-data-service/walkthrough-register-app-azure-active-directory

    Please mark my comments as answered if this helps. 

    Thanks,

    Saurabh

  • Sumit Ruhela Profile Picture
    1,805 on at
    RE: Unable to get the scope value in Oauth2 token access

    Thanks for the response.

    I have tried with implicit grant type as well  but still it asks for scope. below is the snapshot:

    36604.Capture.PNG

    My app is registered in Azure Active directory with all options verfied as mentioned in the walkthrough link.

  • Sumit Ruhela Profile Picture
    1,805 on at
    RE: Unable to get the scope value in Oauth2 token access

    Anyway i was able to receive the scope value following this article

    stackoverflow.com/.../how-to-request-an-azure-bearer-token-properly-or-why-does-it-ask-me-to-send-a-s

    Scope : admin.services.crm.dynamics.com/.default was the value i used for dynamics api

  • Suggested answer
    saurabhtiwarii Profile Picture
    on at
    RE: Unable to get the scope value in Oauth2 token access

    Hey John,

    I did some misconfigurations on Azure AD app registration manifest file (Like "allowPublicClient": false,"oauth2AllowImplicitFlow": true,) and reverted it back to see if the saved cookies can cause authentication issues with Azure AD and it turns out that it does as I could see an error from Azure AD though the AAD error code was different for me (AADSTS700051).

    Please try to clean the cookies on Post man tool from ::

    pastedimage1589725029591v2.png

    Thanks,

    Saurabh

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
MVP-Daniyal Khaleel Profile Picture

MVP-Daniyal Khaleel 125

#2
Tom_Gioielli Profile Picture

Tom_Gioielli 121 Super User 2025 Season 2

#3
Erin Lubben Profile Picture

Erin Lubben 73

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans