Hello!
I am building a console app that will connect to CRM Web API using OAuth2 Authentication. The client is registered in ADFS using Add-AdfsClient command and I am using Microsoft.CrmSdk.WebApi.Samples.HelperCode from NuGet for connection. I also have a different piece of code (which essentially does the same thing - ansrikanth.com/.../connect-to-dynamics-crm-webapi-from-console-application-without-authentication-popup) which throws the same error:
Microsoft.IdentityModel.Clients.ActiveDirectory.AdalServiceException: 'MSIS9611: The authorization server does not support the requested 'grant_type'. The authorization server only supports 'authorization_code' or 'refresh_token' as the grant type.'
This is what our ADFS Server supports:
Supported authorization grants Authorization grant type ADFS (Windows Server 2012 R2) Authorization code grant Supported Implicit grant Not supported Resource Owner Password Credentials grant Not supported Client Credentials grant Not supported
Should we maybe upgrade our ADFS Server?
Or is there any other way to have my client app consume the CRM Web API without having to enter credentials every time?
Should I maybe try another authorization method? If yes - which and how? :D









