microsoft / microsoft/azure-devops-python-api

Is there any workaround for using Entra Tokens?

Open
#517 0 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
684
Forks
218
Avg merge
8d 10h
Merged PRs (30d)
1

Description

https://devblogs.microsoft.com/devops/no-new-azure-devops-oauth-apps-beginning-february-2025/
No new Azure DevOps OAuth apps beginning March 2025, so our team is planning to update our code to use Entra application instead.

With the new Entra on-behalf-of token, we can call dev API directly, like https://dev.azure.com/<our_org>/<our_project>/_apis/git/repositories?api-version=7.1-preview.1, but we can not use it with this SDK. The exception is thrown here:
https://github.com/microsoft/azure-devops-python-api/blob/dev/azure-devops/azure/devops/connection.py#L70
resource_areas = self._get_resource_areas()
"TF400813: The user '<user_id>' is not authorized to access this resource."
This code is supposed to fetch ResourceAreaInfo for azure.devops.connection.Connection.

Is there any workaround to use Entra token? Or any plan to update this SDK to be compatible with Entra?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in azure-devops/azure/devops/connection.py at the _get_resource_areas() call around line 70, then compare the failing SDK request with the direct dev.azure.com API request described in the issue. Investigate how the Entra on-behalf-of token is passed to the Connection and ResourceAreaInfo lookup; done would require a documented workaround or confirmed SDK compatibility without the TF400813 authorization error.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, python
Domain
api, authentication, backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.