-
Notifications
You must be signed in to change notification settings - Fork 217
Open
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
vs4vijay, chiragpachori, CiderHider, saroad2 and WebedMJ
Metadata
Metadata
Assignees
Labels
No labels