Dynamics CRM Online 2016 - Daemon / Server application Azure AD authentication error to Web Api
问题 I am building a C# windows service that needs to connect to the Microsoft Dynamics CRM Web API. I am using the example code from github "A .NET 4.5 daemon application that uses a certificate to authenticate with Azure AD and get OAuth 2.0 access tokens, Github". I am able to retrieve an access token from AAD, however, when I call the Dynamics CRM resource i get the following error: HTTP Error 401 - Unauthorized: Access is denied StatusCode: 401, ReasonPhrase: 'Unauthorized', Version: 1.1, WWW