title: Using Managed Identity in Azure Pipelines: GetUserAccessToken: Failed to obtain an access token of identity. AAD returned silent failure
body: <p>I am trying to run an <a href="https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/deploy/azure-resource-group-deployment?view=azure-devops" rel="nofollow noreferrer">Azure Resource Group Deployment task</a> in Azure Pipelines. I have deployed an <a href="https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/agents?view=azure-devops&amp;tabs=browser#install" rel="nofollow noreferrer">Azure Pipelines self-hosted agent on an Azure VM running Windows</a>, and in my Azure DevOps organization I have set up an <a href="https://docs.microsoft.com/en-us/azure/devops/pipelines/library/connect-to-azure?view=azure-devops#create-an-azure-resource-manager-service-connection-to-a-vm-with-a-managed-service-identity" rel="nofollow noreferrer">Azure Resource Manager service connection to a VM with a managed service identity</a>.</p>
  
  <p>However, I get the following error when trying to configure my Azure Resource Group Deployment task with my service connection with managed identity:</p>
  
  <p>GetUserAccessToken: Failed to obtain an access token of identity . AAD returned silent failure.</p>
  
  <p>Screenshot:</p>
  
  <p><a href="https://i.stack.imgur.com/jPMMD.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/jPMMD.png" alt="enter image description here"></a></p>
  
  <p>I have already verified that I granted access (Contributor) to the VM's managed identity to the target resource group:</p>
  
  <p><a href="https://i.stack.imgur.com/Gej5O.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Gej5O.png" alt="enter image description here"></a></p>
  
  <p>The service connection is also scoped to the Azure subscription:</p>
  
  <p><a href="https://i.stack.imgur.com/2yZGU.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/2yZGU.png" alt="enter image description here"></a></p>
  
  <p>Any help on diagnosing this issue is appreciated. Thanks!</p>