Search code examples
azureauthenticationazure-devopsauthorizationazure-resource-manager

Can I use MSI Token for Azure DevOps REST APIs?


There are following two ways Microsoft have listed for Authenticating REST APIs for Azure DevOps:

https://learn.microsoft.com/en-us/azure/devops/integrate/get-started/authentication/pats?view=azure-devops https://learn.microsoft.com/en-us/azure/devops/integrate/get-started/authentication/oauth?view=azure-devops

Is there any way I can use MSI Token for this?

I have used MSI Token for ARMs for creating Storages, Databases using REST APIs. But I want to create Repository using REST APIs.

Can anyone help me with this?

Thanks in advance.


Solution

  • Can I use MSI Token for Azure DevOps REST APIs?

    Need to say that, no, you can not. Until now, some services in Azure do not support MSI identify authentication, including Azure Devops.

    You can refer to this doc: Services that support managed identities for Azure resources. In this link, we list the services supported by Managed identities for Azure resources. Our team are contributing to expand the services list to make users has more convenience experience with MSI. But, until now, it hasn't support used in Azure Devops.

    But, as we know, MSI is a very convenient identity authentication method. So, I think this is a good feature that the product group can consider with. In addition, until now, in our official feature suggestion for Azure Devops forum, there has been a such suggestion exist in it: Support for client_credentials / MSI authorization against API. You can comment and vote it there. Our PM and Product Group are reviewing these suggestion regularly and considering take it as plan.