Announcements
No record found.
I would like to connect to the Field Service API. I have a username and password for the webapp. How would I get a client id and secret in order to auth via OAuth2 ( which is required by the API)?
Thanks.
You have to create an "Application User" and register an app in Azure Active Directory. Please look in to the below link for detailed information.
https://docs.microsoft.com/en-us/powerapps/developer/common-data-service/authenticate-oauth
Thank you. I was able to register an application, get a client id and generate a client secret.
How can I find what URL to hit to get the token? I can't seem to find it in the docs nor in the Azure AD.
In the above response, i mentioned an URL and a sample ode is available in that URL. It's like your D365 Org.
Https://<yourcrmorg>.crm<i>.dynamics.com
Did you try that sample
The docs lead me here: github.com/.../confidential_client_secret_sample.py
Since I was using python and, from what I read, MSAL is replacing ADAL. The sample code worked for me. But that was for the graph application. I am having issues with getting it to work with Field Service entities.
Maybe, what I put for the “scope” and “endpoint” values are incorrect?
"scope": [ "https://admin.services.crm.dynamics.com/.default" ]
"endpoint": "https://<my_org>.crm.dynamics.com/api/data/v9.0/WhoAmI
I am not getting a valid response when I do an HTTP GET with those value. Note, that I am getting a token back. But when I try to do a simple GET, I am get None as a response which leads me to believe that the token I received was invalid.
This is an old thread but did someone find an answer?
Having the same problem when trying to get the an access token for Dynamics 365 Business Central api using MSAL.
I get the token but get Unauhtorized -error when trying to call the api using the token. Graph api sample works fine so I'm suspecting the problem is with the scope, currently using "https://api.businesscentral.dynamics.com/.default" as scope.
Did you figure this out? I have same issues. Scope is not working for me here. I get 401
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.
Congratulations to our 2026 Super Stars!
Thanks to all of our 2025 Community Spotlight stars!
These are the community rock stars!
Stay up to date on forum activity by subscribing.
11manish 36
Mallesh Deshapaga 32
ManoVerse 30 Super User 2026 Season 1