web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Answered

same azure app for different vendor consuming crm api

(0) ShareShare
ReportReport
Posted on by

Hi,

I have created azure app registration, got clientid, clientsecret, tenantid.

There is a requirement that one of the third party vendor has to push records to crm entity. For that I need to provide the api details and clientsecret to them.

Same kind of requirement is for another third party vendor also. Is it advisable to let them use the same azure app details.

But different users has to be create with different security roles for them.

I have the same question (0)
  • Suggested answer
    Naveen Ganeshe Profile Picture
    3,397 User Group Leader on at

    Hello Anandhcrm,

    I would suggest you to create different apps in azure for vendors. that way you can keep track of every app interaction with D365

  • Pradeep Rai Profile Picture
    5,489 Moderator on at

    I agreed with naveen.

  • Anandhcrm Profile Picture
    on at

    I can understand. But I am just asking is it possible technically ? Creating two application users having different security roles and assign same clientid to both of them ?

  • Verified answer
    Naveen Ganeshe Profile Picture
    3,397 User Group Leader on at

    I don't think  we can create two app users with same client id

  • Anandhcrm Profile Picture
    on at

    I got clientid, clientsecret after done the azure app registration.

    I can get the access token by specifying the below details

    {

    "grant_type" : "Client Credentials",

    "ClientID" : "xxxx",

    "ClientSecret" :"xxxx",

    "Access token url" : "login.microsoftonline.com/.../token",

    "scope" : "xxxxxx.crm8.dynamics.com/.default"

    }

    But, when i consume the crm api using this token, im getting 401: UnAuthorized error.

    When I decode the access token, i get below details

    pastedimage1674539236741v1.png

    I have created the application user in dynamics, assigned security role and map with the clientid. But I didnt find the user/role details in the decrypted access token.

    Anything I did wrong or need to do something else ?

  • Suggested answer
    Naveen Ganeshe Profile Picture
    3,397 User Group Leader on at

    Hi Anandh,

    Please take a look at this git:

    C# : github.com/.../Program.cs

  • Suggested answer
    Bipin D365 Profile Picture
    28,983 Moderator on at

    Hi,

    Have you added crm_online impersonation permission to your azure app under api permission tab..

    learn.microsoft.com/.../walkthrough-register-app-azure-active-directory

    Please check step from above article

  • Anandhcrm Profile Picture
    on at

    I have not changed anything, but it is working now.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 171 Super User 2025 Season 2

#2
#ManoVerse Profile Picture

#ManoVerse 83

#3
Jimmy Passeti Profile Picture

Jimmy Passeti 50 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans