Skip to content

Conversation

chlowell
Copy link
Member

@chlowell chlowell commented Oct 7, 2025

before

"the requested identity has not been assigned to this resource"

after

"ManagedIdentityCredential: the requested identity has not been assigned to this resource. To troubleshoot, visit https://aka.ms/azsdk/rust/identity/troubleshoot#managed-id"

Closes #2677

@chlowell chlowell self-assigned this Oct 7, 2025
@github-actions github-actions bot added the Azure.Identity The azure_identity crate label Oct 7, 2025
@chlowell chlowell marked this pull request as ready for review October 7, 2025 00:31
@Copilot Copilot AI review requested due to automatic review settings October 7, 2025 00:31
Copy link
Contributor

@Copilot Copilot AI left a 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 enhances error messages in the Azure Identity credential implementations to provide better troubleshooting guidance by linking to specific sections of the Azure SDK troubleshooting guide.

  • Introduces a new authentication_error function that wraps credential errors with credential-specific troubleshooting links
  • Updates all credential implementations to use this error wrapper in their get_token methods
  • Adds comprehensive test coverage to verify that error messages include the appropriate troubleshooting links

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
lib.rs Adds the authentication_error helper function and troubleshooting guide constant
managed_identity_credential.rs Updates error handling and adds test for troubleshooting link inclusion
workload_identity_credential.rs Updates error handling and adds test for troubleshooting link inclusion
client_secret_credential.rs Updates error handling and enhances existing test to verify troubleshooting link
client_certificate_credential.rs Updates error handling to include troubleshooting link
azure_pipelines_credential.rs Updates error handling and enhances existing test to verify troubleshooting link

@github-project-automation github-project-automation bot moved this from Untriaged to In Progress in Azure Identity SDK Improvements Oct 7, 2025
@chlowell chlowell requested a review from heaths October 8, 2025 15:43
@chlowell chlowell merged commit f5aaf74 into Azure:main Oct 8, 2025
18 checks passed
@github-project-automation github-project-automation bot moved this from In Progress to Done in Azure Identity SDK Improvements Oct 8, 2025
@chlowell chlowell deleted the tsg branch October 8, 2025 18:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Azure.Identity The azure_identity crate
Projects
Development

Successfully merging this pull request may close these issues.

Link azure_identity errors to troubleshooting guide
2 participants