microsoft / microsoft/azure-devops-python-api
'DefaultAzureCredential' object has no attribute 'signed_session'
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 684
- Forks
- 218
- Avg merge
- 8d 10h
- Merged PRs (30d)
- 1
Description
I'm trying to create a python script to interact with Azure DevOps and I have problem with authentication. I don't want to use PAT.
This works but I noticed it is recommended to use azure.identity instead of azure.common.credentials.get_azure_cli_credentials().
from azure.common.credentials import get_azure_cli_credentials
from azure.devops.connection import Connection
credential = get_azure_cli_credentials()[0]
connection = Connection(base_url="https://dev.azure.com/org_name", creds=credential)
core_client = connection.clients.get_core_client()
projects = core_client.get_projects()
When I try to use DefaultAzureCredential from azure.identity, I get following error:
'DefaultAzureCredential' object has no attribute 'signed_session'
from azure.identity import DefaultAzureCredential
from azure.devops.connection import Connection
credential = DefaultAzureCredential()
connection = Connection(base_url="https://dev.azure.com/org_name", creds=credential)
core_client = connection.clients.get_core_client()
projects = core_client.get_projects()
azure.identity = 1.12.0
azure.devops = 7.1.0b3
azure.common = 1.1.11
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue with the shown DefaultAzureCredential and azure.devops Connection example, then compare the credential interfaces used by Connection and azure.identity. Check whether the reported versions support this authentication path; done means a documented non-PAT connection can retrieve projects without the signed_session error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, python
- Domain
- api, authentication
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 42/100