Closed kivancbakdi closed 6 years ago
Hi, I am facing exact same issue. Could you please explain how you solved this?
Hi @RasikaMK ,
Of course;
Let's start by install this package: https://www.npmjs.com/package/ng2-adal
And you can check this link on how to use it: https://github.com/ranveeraggarwal/angular-adal-quickstart
Please do not hesitate to contact me if you have any problems: kivanc.bakdi@peakup.org
I did not have a problem getting access token and user information, thank you for that.
However, this access token can not be used on the CRM ODATA API.
My configuration;
return { instance: 'https://login.microsoftonline.com/', tenant: 'my_tenant', clientId: 'my_clientId', endpoints: { 'resource_id': 'resource_url' }, postLogoutRedirectUri: "http://localhost:4200/", extraQueryParameter: 'nux=1', popUp: false, cacheLocation: 'localStorage' }
HTTPGET : https://xxx.crm4.dynamics.com/api/data/v8.2/new_licencemonitors?$filter=new_licencemonitor_countofseat%20ne%200&$select=new_licencemonitor_countofseat,_new_licencemonitor_account_value
Headers:
Error: HTTP Error 401 - Unauthorized: Access is denied
Do you have any idea why?
Solved. I just remove the library.