Skip to content
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

How to get a token from another tenant than the user that logs in #1308

Open
BartNetJS opened this issue Oct 9, 2024 · 0 comments
Open

How to get a token from another tenant than the user that logs in #1308

BartNetJS opened this issue Oct 9, 2024 · 0 comments

Comments

@BartNetJS
Copy link

I'm trying the following:

GET https://[a rest url]
Authorization: Bearer {{$aadToken tenantId={{tenant-id}} clientId={{client-id}} authority=https://login.microsoftonline.com/{{tenant-id}}}}

The user i login with is from another tenant, but has access to the tenant defined as tenant-id

What happens is that the interactive browser is redirecting to the tenant from the users email address, and not the tenant-id
The url is like this: https://login.microsoftonline.com/common/reprocess?....

But should be: https://login.microsoftonline.com/tenant-id where tenant-id is the {{tenant-id}}

How can I achieve this?

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

No branches or pull requests

1 participant