How to do a Dynamics 365 web API request using OAuth2 access token retrieved from ADFS 2016

This screen cast is about Dynamics 365 web API request using OAuth2 access token retrieved from ADFS 2016. I show you how to configure the ADFS 2016 application group to allow client application access to CRM web API using OAuth2 resource owner credentials grant type (used for obtaining the access token).

Until very recently, Dynamics 365 did not support ADFS v.2016 (v.4.0). In April 2017, Microsoft added a support for ADFS 2016 and now also those OAuth2 grant types can be used which require client_secret. This is required for those Dynamics CRM servers which are on-premise and configured to IFD mode (using claims-based authentication). Naturally for Dynamics 365 online, the Azure Active Directory Authentication Library (ADAL) is used instead of ADFS 2016. The steps for configuring the client application access are quite similar but there are also differences when comparing to ADFS 2016.

In this video blog, I also share a few tips and tricks which I learned while troubleshooting this scenario recently. Hopefully this will help you out to configure the same if you are trying to get it working.