I'm working on creating Microsoft Dynamics CRM integration for my users, which involves authenticating their CRM accounts and creating/updating records.
Over the past two days, I've been trying to understand how to use the Dynamics CRM API. It's quite confusing. Here's what I have done so far:
- Registered a new app in the Azure Portal with Dynamics API access and stored the Application ID and Secret.
- Created a free trial Dynamics Sales account to test the API using my personal Outlook account.
Now, when I try to authorize the CRM account using the endpoint https://login.microsoftonline.com/organizations/oauth2/v2.0/authorize
, it says that a scope is required. However, I don't know which scope is required and how to access the CRM API for the user using OAuth2.
I tried adding ./default
as a scope for the auth URL, but it says that I can't use a personal account. Strangely, I was able to create a CRM account using my personal account.
Could anyone guide me on how to access this API using OAuth2? I'm completely lost now.