Hi there
I'm using this sample:
https://msdn.microsoft.com/en-us/library/mt779074.aspx
I put in my credentials and try to connect to a CRM 2016 Organization but always get 401 Unauthorized.
IIS Authentication; Enabled: Anonymous, ASP.NET, Basic, Windows; Disabled: Digest, Forms.
Fiddler Screenshot:
Any help is much appreciated, really struggling with this one.
*This post is locked for comments
Hi Kim,
Thank you for your feedback. I am glad that i could assist you.
This should be possible with ADFS 2016 if i'm not mistaken.
Please check a similar thread here: community.dynamics.com/.../268326 - maybe the code there can give you a starting point.
Hope this helps
Radu
I am actually using IFD, mistake on my part. After setting it up correctly it is now working fine. You sir are a gentleman and a scholar, thank you very much.
Only thing left now is to somehow pass the credentials while calling the API so I can execute a Console Application without having to fill up the username/passwort prompt.
If you are not using IFD, are the SPNs set up properly?
Hi,
Are you using IFD? If so, I believe you need to register the app.
Regards,
Radu
No, is this really needed for on-prem connections?
I was following this guide:
https://msdn.microsoft.com/en-us/library/mt770369.aspx#bkmk_prerequisites
"Access to Dynamics Dynamics 365 Online or on-premises (or later). For all Dynamics 365 installation types, a user account with privileges to perform CRUD operations is required.
In order to run samples against Dynamics 365 (online), you must register your application with Azure Active Directory to obtain a client ID and redirect URL. For more information, see Walkthrough: Register a Dynamics 365 app with Azure Active Directory."
No mentioning of registering through Azure AD when using on-premises.
Hello,
Did you also register the app in AD as per: msdn.microsoft.com/.../dn531010.aspx
Besides the credentials you also need to specify the client id
Hope this helps
Radu
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,240 Super User 2024 Season 2
Martin Dráb 230,149 Most Valuable Professional
nmaenpaa 101,156