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

Get User Token from Dynamics CRM On Premise

(0) ShareShare
ReportReport
Posted on by 172

Hi all,

I have an Angular App in which I call an own Web API. In the Web Api I use CRM SDK to get some Data from Dynamics CRM On Premise. From Front end I send username, pw and in some cases the org name.

Because i dont find a solution to use controller sessions in web api i send user credentials to each controller and create the org service. Because the user is admin on all organizations I dont wanna create a new org service for this user.

My question:

1. is it possible to get the token for the user?

2. If its not possible has anybody an idea how can I get data from different orgs with one user?

Example:

The server has 3 Organizations. First I retrieve all orgs using DiscoveryService. After I send ord result to App Front end and user can chose a Organization to retrieve data. After selecting an Organization with the same credentials I create Orgservice to get data.

Best way were, I create first DiscoveryService with the user and use a token to create in all next steps an organization service.

I only find a way for Dynamics CRM Online using AAD but I need a solution for On Premise.

Thanks for help.

I have the same question (0)
  • Suggested answer
    David Yu Profile Picture
    on at

    Hi Daniel,

    You may check the following best practices from our official document.

    docs.microsoft.com/.../best-practices-sdk

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