Hello,
I have a requirement to call external web api from crm dynamics web ressource. The Web API uses Azure AD authentication an the same tenant as crm dynamics.
I am encountering some issue with the acquireToken. The user might be connected to CRM Dynamics but not connected to his account. So i would like to use CRM dynamics user session to authenticate to the Web API using SSO mechanism.
I use Adal.js within my web resources and i call the method acquireToken. In some cases i get a message login required.
According to the this documentation:
Applications on different domain
When applications are hosted on different domains, the tokens cached on domain A cannot be accessed by ADAL.js in domain B.
This means that when users signed in on domain A navigate to an application on domain B, they will be redirected to the AAD page. Since Azure AD still has the user session cookie, the user will not have to re-enter the credentials. If the same user has multiple user accounts in session with Azure AD, the user will have a chance to pick the relevant account to login with.
I had an idea and i am not sure if it's applicable but it's to add custom domain on my App Service that uses CRM portal dynamics dns. If this is applicable can anyone tell me how to verify domain ownership within crm dynamics portal ? (i know the crm dynamics instance belog to microsoft but do we have some control on dynamics organization portal ?)
Best regards,
Emad