Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Unanswered

Scope issue with OAuth connection to Dynamics AD app

(1) ShareShare
ReportReport
Posted on by 6
Hey everyone,
 
I'm running into this annoying and process breaking OAuth issue that's driving me up the wall. I'm using iPaaS solution Make.com to create a custom connection to an AD app. In Make.com, I've created some integration scenarios that utilize this connection to execute tasks like creating leads, reading accounts and contacts, and sending that to other systems etc. This connection works fine, except every 10 minutes or so (which coincides with a typical OAuth refresh cycle if I'm not mistaken), my scenarios will bug out because the nodes that interact with the AD app start throwing 401 errors. 
 
When I go into the connection and manually reauthorize it, I get the following error:
 
{  /message/: /The request failed due to failure of a previous request./,  /code/: /SC424/,  /suberrors/: [    {      /message/: /AADSTS500011: The resource principal named https://xxxxxxx.crm4.dynamics.com/.default,https://xxxxxx.crm4.dynamics.com was not found in the tenant named xxxxxx. This can happen if the application has not been installed by the administrator of the tenant or consented to by any user in the tenant. You might have sent your authentication request to the wrong tenant. Trace ID: 080be014-db46-4dc6-b6b7-444640130b00 Correlation ID: 42b3cd7b-0049-44ab-9c9c-c60b36f96ecd Timestamp: 2024-04-12 07:11:25Z/,      /name/: /Error/    }  ]}
The resource principal corresponds to the Scope value that I enter when configuring the connection (see screenshot below). But that full string that includes the URL twice is not supposed to be there. Somehow my OAuth process has decided to append the base URL to the Scope definition again whenever it tries to reauthorize. And obviously, that throws an error because there's no such scope in the AD App. I can fix it by manually editing the connection, and without changing anything to the window below, saving it. That somehow resets it, but obviously I don't want to do that every 10 minutes. 
 
 
I've reached out to Make.com for support, but they're not super helpful. I'm trying to determine whether this is caused by Make or by the AD app, but I don't know a lot about Dynamics (or OAuth for that matter, only the basics). Does anyone know if this might be caused by something in the AD configuration?
  • André Arnaud de Calavon Profile Picture
    293,289 Super User 2025 Season 1 on at
    Scope issue with OAuth connection to Dynamics AD app
    Hi Bob,
     
    I'm not able to help you make the connection work. It could be a permission issue or maybe a wrong URL. Is there any community forum for Make.com where you can ask the question? Or you can try using Postman first to check if a connection will work.
     
  • Bob2245 Profile Picture
    6 on at
    Scope issue with OAuth connection to Dynamics AD app
    Hi Andre,
     
    Unfortunately I have to make do with Make.com in this scenario. Project scope doesn't include using other systems.
  • André Arnaud de Calavon Profile Picture
    293,289 Super User 2025 Season 1 on at
    Scope issue with OAuth connection to Dynamics AD app
    Hi Bob,
     
    Have you tried using Power Automate or Logic Apps instead of make.com?

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.

Helpful resources

Quick Links

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 293,289 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 232,068 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Product updates

Dynamics 365 release plans