
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.
Hi Daniel,
You may check the following best practices from our official document.