-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Update managed identity docs with latest best practices #49696
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR simplifies managed identity authentication code samples by removing redundant local development fallback logic and relying on the framework's default DefaultAzureCredential behavior when no explicit credential is provided.
- Removed explicit
DefaultAzureCredentialinstantiation in development environments - Updated documentation to clarify that
DefaultAzureCredentialis created automatically by the framework - Cleaned up unused imports and duplicate code snippets
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| docs/azure/sdk/snippets/authentication/user-assigned-managed-identity/Program.cs | Removed unused imports, simplified credential logic to only explicitly handle production/staging environments |
| docs/azure/sdk/snippets/authentication/system-assigned-managed-identity/Program.cs | Removed unused imports, simplified credential logic to only explicitly handle production/staging environments |
| docs/azure/sdk/includes/implement-user-assigned-identity.md | Updated documentation to reflect automatic DefaultAzureCredential creation and removed references to removed code snippets |
| docs/azure/sdk/includes/implement-system-assigned-identity.md | Updated documentation to reflect automatic DefaultAzureCredential creation and removed references to removed code snippets |
| docs/azure/sdk/authentication/system-assigned-managed-identity.md | Updated publication date |
Summary
UseCredential.Internal previews