Hi Ihor Vinokur
Azure DevOps does not use Entra ID OAuth2 tokens directly for Git remote operations like git pull or git push.
Instead, it expects one of the following:
- Personal Access Token (PAT)
- OAuth2 via Azure DevOps itself (not Entra) - https://learn.microsoft.com/en-us/azure/devops/integrate/get-started/authentication/oauth?view=azure-devops
- Service Principal + Service Connection
- Git Credential Manager (GCM)
The error "Your organization does not have a subscription (or service principal) for the following API(s): Azure DevOps"
means that Azure DevOps is not exposed as an enterprise application in your tenant. Unlike Microsoft Graph, Azure DevOps doesn’t automatically register itself in Entra ID for delegated permissions. So even if you manually add the API permissions, Entra ID can’t validate or consent to them.
Steps for OAuth2 via Azure DevOps itself (not Entra):
- Go to Azure DevOps -> Organization Settings -> OAuth apps or configurations.
- Register your client app.
- Request scopes such as vso.code_write.
- Use DevOps’s OAuth endpoints (https://app.vssps.visualstudio.com/oauth2/authorize, .../token).
- Use the token against Git HTTPS endpoints.
Personal Access Token (PAT):
- Go to Azure DevOps -> User Settings -> Personal Access Tokens -> Generate a token with
Code (Read & Write)
scope and use it in Git like:
and provide the PAT as the password.git clone https://<username>@dev.azure.com/<org>/<project>/_git/<repo>
Hope this helps!
Please Let me know if you have any queries.