Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Copilot Studio - Bot Extensibility
Unanswered

Enable multitenant authentication for Copilot bot

(3) ShareShare
ReportReport
Posted on by 49
Hello Community , 

I am stuck with a requirement where I need users from different client to login to Copilot but using Azure Active directory I am unable to achieve it , So I have chosen to go with Generic OAuth ,which works perfectly fine from Bot side but whenever I am trying to sign in to bot using Custom canvas (directline api) I am not able to do so . 
 
if (activity.from && activity.from.role === 'bot' &&
    (resourceUri = getOAuthCardResourceUri(activity))) {
    exchangeTokenAsync(resourceUri).then(function (token) {
        if (token) {
            directLine.postActivity({
                type: 'invoke',
                name: 'signin/tokenExchange',
                value: {
                    id: activity.conversation.id,
                    connectionName: activity.attachments[0].content.connectionName,
                    token
                },
                "from": {
                    id: userId,
                    name: clientApplication.account.name,
                    role: "user"
                }
            }).subscribe(
                id => {
                    console.log(id)
                    if (id === 'retry') {
                        return next(action);
                    }
                },
                error => {
                    return next(action);
                }
            );
            return;
        }
        else
            return next(action);
    });
 
So if you guys having any idea how to achieve the following , it will be helpful !
Categories:
  • CU23011520-0 Profile Picture
    on at
    Enable multitenant authentication for Copilot bot
    Hi, please were you able to workaround this? I’m currently trying to do a similar usecase for any user from different tenant or personal account is able to sign in and communicate with the bot but no luck so far.
  • adilei Profile Picture
    on at
    Enable multitenant authentication for Copilot bot
    Here are the instructions on how to enable SSO for generic OAuth providers (it includes a sample as well): Configure single sign-on with generic OAuth providers - Microsoft Copilot Studio | Microsoft Learn
     
    Let me know if this works for you
  • Sohom Rik Profile Picture
    49 on at
    Enable multitenant authentication for Copilot bot
    I have followed the documentation but the thing is with all other method except the Generic OAUTH have the parameter tenantid which triggers tenant login page by default . 

    I have achieved the Multitenant login from bot side using Generic OAuth but the now SSO stopped working , which was working fine before using Generic OAuth
  • Mahesh Chintha Profile Picture
    158 on at
    Enable multitenant authentication for Copilot bot
    Refer to below documentation for Copilot Studio multi tenant SSO
     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Copilot Studio

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 169 Super User 2025 Season 1

#2
Romain The Low-Code Bearded Bear Profile Picture

Romain The Low-Code... 150

#3
sandeep_angara Profile Picture

sandeep_angara 75

Featured topics