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

Announcements

News and Announcements icon
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,985 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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Hamza H Profile Picture

Hamza H 142 Super User 2026 Season 1

#2
Nagaraju_Matta Profile Picture

Nagaraju_Matta 128

#3
11manish Profile Picture

11manish 121

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans