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

Same Admin user to be able to switch the tenants on OAuth page to grant permissions & install the MS Teams bot #4807

Open
yogendrajs opened this issue Dec 9, 2024 · 0 comments

Comments

@yogendrajs
Copy link

Please note that I've already asked this question on the StackOverflow page, but couldn't get an answer: https://stackoverflow.com/questions/79257912/same-admin-user-to-be-able-to-switch-the-tenants-on-oauth-page-to-install-the-ms

I am posting the same question here again:

I have built an MS Teams bot using the botbuilder JS framework. I've created an admin user in tenant A and the bot was authorized to get the required permissions and be installed in the tenant on behalf of the whole organization using https://login.microsoftonline.com/common/adminconsent?client_id=<client_id>&redirect_uri=<redirect_uri>&state=<state>&prompt=select_account, params are configured in the Azure App registration for that app.

I have invited that admin user to a different tenant B and assigned the Global Administrator role where I want to install the same bot. So, when I use the above adminconsent URL from my app and get redirected to the OAuth page to grant permissions, I do not see an option to switch the original tenant A to tenant B where I want to install the bot. I couldn't find how to do so anywhere in the documentation.

However, I could install the bot in the tenant B using https://login.microsoftonline.com/<tenant_id>/adminconsent?client_id=<client_id>&redirect_uri=<redirect_uri>&state=<state>&prompt=select_account where I manually added tenant_id of the tenant B in the URL instead of common.

Please note that Supported Account Types in the Azure portal for that app is set to Multiple organizations, so it could be installed to multiple tenants.

Any leads in this direction will be appreciated. Thank you!

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