Retrieval of access token fails with 401 response code while using Azure Automations spokeIssue This article explains one of the reasons for access token retrieval failure while using Azure Automations spoke. Documentation for configuring Azure Automations Spoke: Set up Microsoft Azure AD spoke The access token retrieval fails with HTTP Response 401 while retrieving access tokens from the credential records. ReleaseAll versionsCauseMissing roles Azure subscription for the user, with which the token retrieval is tried.ResolutionTo retrieve the token successfully, please ensure the below configuration is in place : - Default grant type should be "Authorization Code" - The user login for the access token should have the “contributor” or “Service Administrator” role within the subscription. - There are no spaces in the URL configured to retrieve the token in the OAuth entity record.