Skip to content

InteractiveBrowserCredential does not support redirect_uri containing a path #43940

@JoeyLemur

Description

@JoeyLemur
  • Package Name: azure-identity
  • Package Version: 1.25.1
  • Operating System: n/a
  • Python Version: 3.10.4

Describe the bug
Specifying a redirect_uri with InteractiveBrowserCredential does not support a URL containing a path

To Reproduce
Steps to reproduce the behavior:

from azure.identity import InteractiveBrowserCredential
client_id    = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
redirect_uri = "https://localhost:27097/redirect"

credential = InteractiveBrowserCredential(client_id=client_id, redirect_uri=redirect_uri)
token = credential.get_token(".default")

Expected behavior
SSO login to succeed

Actual behavior
SSO gives the following error

AADSTS50011: The redirect URI 'http://localhost:27097' specified in the request does not match the redirect URIs configured for the application 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'. Make sure the redirect URI sent in the request matches one added to your application in the Azure portal. Navigate to https://aka.ms/redirectUriMismatchError to learn more about how to fix this.

Metadata

Metadata

Assignees

Labels

Azure.IdentityClientThis issue points to a problem in the data-plane of the library.customer-reportedIssues that are reported by GitHub users external to the Azure organization.needs-team-attentionWorkflow: This issue needs attention from Azure service team or SDK teamquestionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

Type

No type

Projects

Status

Untriaged

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions