Hi Experts,
I am trying to retrieve user roles via web api and getting 401 unauthorized error.
Any ideas on what could be causing this?
Thanks,
Parth Bhaidani
*This post is locked for comments
Hi Experts,
I am trying to retrieve user roles via web api and getting 401 unauthorized error.
Any ideas on what could be causing this?
Thanks,
Parth Bhaidani
*This post is locked for comments
Hi
Are you able to run other queries? is it just retrieving role query that fails or all types of queries fail with 401? It looks like the authenticated and authorized client context is not being detected by the API.
Does the same work on Desktop client?
I would try and do a WhoAmI and see if that fails
Hi Parth,
In order to perform CRUD operations while using D365 App for Outlook, it is recommended that you use the Xrm.WebApi methods.
Thanks!
Is this CRM Online or OnPremise? If you are using IFD, did you register the application from which you want to retrieve the data?
Please see docs.microsoft.com/.../walkthrough-register-dynamics-365-app-azure-active-directory for CRM Online
Here is how you would do it for CRM OnPrem docs.microsoft.com/.../walkthrough-register-app-active-directory
André Arnaud de Cal...
292,516
Super User 2025 Season 1
Martin Dráb
231,432
Most Valuable Professional
nmaenpaa
101,156