Scenario -
Develop a console app which can interact with Dynamics 365 online platform and do basic operation - create antity, update, delete and get events.
Problem -
AADSTS65005 : Using application 'adapter' is currently not supported for your organization XXXXX because it is in an unmanaged state. An administrator needs to claim ownership of the company by DNS validation of XXXX before the application adapter can
be provisioned.
Details -
I am very new to Azure AD and dynamics world. Here is what I did -
1. Provisioned a dynamics url for my org. https://xxx.crm.dynamics.com using my organization email.
2. Logged onto azure portal and registered a native app.
When I click on users, I can see myself under my company domain.
3. Gave permissions to my app -
Windows Azure Active Directory and Dynamics CRM online
4. Downloaded your sample code - Simpel Web Api and modified my url etc.
(First the app wasn't compiling because AcquireToken has been replaced with AcquireToken async. I fixed that.
5. On trying to get a token using OAuth and ADAL , I get following error -
Using application 'adapter' is currently not supported for your organization XXX because it is in an unmanaged state. An administrator needs to claim ownership of the company by DNS validation of XXX before the application adapter can be provisioned.
- What do I need to do to fix this?
- Am I headed on right path ? In order to interact with dynamics platform programatically, do I need to authenticate via AD using oauth?
- What is wrong with my approach?
- Do I need additional permissions for my account?
- Also, in PlatformParameters for AcquireTokenAsync , I am passing Always. Although I do not want the user to be prompted, There will be no user interaction from my application. How can I achieve that?
Thanks