[BUG] Azure.Identity - AuthorizationCodeCredential stopped working after 1.11.0 #43468
Labels
Azure.Identity
Client
This issue points to a problem in the data-plane of the library.
customer-reported
Issues that are reported by GitHub users external to the Azure organization.
needs-team-attention
Workflow: This issue needs attention from Azure service team or SDK team
question
The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Library name and version
Azure.Identity 1.11.0
Describe the bug
I'm trying to upgrade from version 1.9.0 to latest 1.11.1. The code below uses AuthorizationCodeCredential implementation to exchange authorization code and authorize for GraphServiceClient.
This implementation was working in 1.9.0 but stopped working in version 1.11.0 +.
Last line throws exception
I inspected outgoing HTTP requests. And I see that request to token endpoint POST https://login.microsoftonline.com/XXXX/oauth2/v2.0/token is different. Now library adds extra 'claims' param to request body
...&claims=<MY_REDIRECT_URL_GOES_HERE>&... which API considers as incorrect.
Is this a bug? If not a bug, what is correct usage of AuthorizationCodeCredential?
Expected behavior
I'm able to authenticate using AuthorizationCodeCredential implementation
Actual behavior
Exception is thrown; see description.
Reproduction Steps
Use code provided in description. Lib versions: Azure.Identity 1.11.0, Microsoft.Graph 5.49.0
Environment
Windows 11, ASP NET Core, net 6.0
The text was updated successfully, but these errors were encountered: