Link to home
Start Free TrialLog in
Avatar of Rohit Bajaj
Rohit BajajFlag for India

asked on

Getting invalid token on web api for dynamics

HI,
I am making the call organisationUri/api/data/v8.0/contacts GET request through postman -
User generated imageUser generated imageGetting invalid auth token.
what could be the reason for that..
The authToken is not expired becasue i generated a fresh one.
Also i request authToken with the scope - Directory.Read.All Directory.AccessAsUser.All offline_access User.Read
could it be because of the scope that i am using .

Thanks
ASKER CERTIFIED SOLUTION
Avatar of Rikin Shah
Rikin Shah
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Rohit Bajaj

ASKER

yes I have created an application here - https://apps.dev.microsoft.com/#/application/552c9f85-508d-4a4a-8d59-c70308be31e6
I found this is the latest way probably to create an application...Other way is to directly go to azure and create the application.
Is there any difference between the two ??
I am getting accessToken... But i guess some problem with specifying scopes to read Leads data etc.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I spotted something of my application on azure portal :
User generated imageI think due to this I am unable to access crm data as the application does not have privelge to access data...
But I wanted to do this for testing purpose create an application and then access the data on the dynamics crm for the same user..
How do i do that...
I think for testing pupose azure should allow me as admin... Is there any way ??
Solution!