Skip to main content

Notifications

Announcements

No record found.

Customer experience | Sales, Customer Insights,...
Answered

same azure app for different vendor consuming crm api

(0) ShareShare
ReportReport
Posted on by 524

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.

  • Anandhcrm Profile Picture
    Anandhcrm 524 on at
    RE: same azure app for different vendor consuming crm api

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

  • Suggested answer
    Bipin D365 Profile Picture
    Bipin D365 28,964 Super User 2024 Season 1 on at
    RE: same azure app for different vendor consuming crm api

    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

  • Suggested answer
    Naveen Ganeshe Profile Picture
    Naveen Ganeshe 3,393 User Group Leader on at
    RE: same azure app for different vendor consuming crm api

    Hi Anandh,

    Please take a look at this git:

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

  • Anandhcrm Profile Picture
    Anandhcrm 524 on at
    RE: same azure app for different vendor consuming crm api

    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 ?

  • Verified answer
    Naveen Ganeshe Profile Picture
    Naveen Ganeshe 3,393 User Group Leader on at
    RE: same azure app for different vendor consuming crm api

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

  • Anandhcrm Profile Picture
    Anandhcrm 524 on at
    RE: same azure app for different vendor consuming crm api

    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 ?

  • Pradeep Rai Profile Picture
    Pradeep Rai 5,490 Super User 2024 Season 2 on at
    RE: same azure app for different vendor consuming crm api

    I agreed with naveen.

  • Suggested answer
    Naveen Ganeshe Profile Picture
    Naveen Ganeshe 3,393 User Group Leader on at
    RE: same azure app for different vendor consuming crm api

    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

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans