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,...
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.

I have the same question (0)
  • Community Member Profile Picture
    on at

    i think you check my wrote other thread.

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

    :)

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

    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/

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 70 Super User 2025 Season 2

#2
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 33 Most Valuable Professional

#3
Daniyal Khaleel Profile Picture

Daniyal Khaleel 32 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans