Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested answer

Trying to understand OAuth set up

(0) ShareShare
ReportReport
Posted on by 82

We have many command line apps that are scheduled and have been using basic authentication with XRMTooling and a Connection String.

We are now faced with using OAuth.

I would like to create a single Azure App to access Dynamics and then supply a username (and password if necessary) to run as that user as opposed to tying a single user to the app.  Is that possible?

I have got my head around Server to Server which is Create the App, add a new User Account in Power Platform with permission and when you use the Client Secret it will just work.

For our scheduled jobs I want more flexibility so I think I am looking for API type access.  I am finding instructions are a but muddy.  Do I need an App per "App ID - User" combination?  Feels wasteful when I would like to access as one of two or three users. 

We already have Service Accounts in AD but all the instructions I can see relate to adding a new user in Power Platform where we already have users for various purposes.  |can't see how to associate a pre-existing Non-Interactive account with an App.

  • Suggested answer
    Bipin D365 Profile Picture
    28,981 Moderator on at
    RE: Trying to understand OAuth set up

    HI,

    You can not map multiple application users to single app. But you can use multiple users by supplying the username and password to below connection string by using the single app.

    AuthType=OAuth;Username=bipinshan@bipininfysolution.onmicrosoft.com;Password=;Url=org50b8451e.crm8.dynamics.com/.../58145B91-0C36-4500-8554-080854F2AC97;LoginPrompt=Auto" />

    Make sure you create new app and use App id in your connection string. Also you will have to add redirect url in your app in same format as above.

    Also, you need set Yes in Allow public Client under authentication. You would need to add Dynamics CRM  Api permission  .

    Check below docs for more details.

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

    Please mark my answer verified if this is helpful!

    Regards,

    Bipin Kumar

    Follow my Blog: xrmdynamicscrm.wordpress.com/

  • Community Member Profile Picture
    on at
    RE: Trying to understand OAuth set up

    i think you check my wrote other thread.

    community.dynamics.com/.../crmserviceclient-not-working-for-oauth-type

    :)

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 Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Kudos to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Daivat Vartak (v-9davar) Profile Picture

Daivat Vartak (v-9d... 225 Super User 2025 Season 1

#2
Muhammad Shahzad Shafique Profile Picture

Muhammad Shahzad Sh... 106

#3
Vahid Ghafarpour Profile Picture

Vahid Ghafarpour 82 Super User 2025 Season 1

Overall leaderboard

Product updates

Dynamics 365 release plans