web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Copilot Studio / Enable multitenant aut...
Copilot Studio
Unanswered

Enable multitenant authentication for Copilot bot

(3) ShareShare
ReportReport
Posted on by 53
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:
I have the same question (0)
  • Mahesh Chintha Profile Picture
    158 on at
    Refer to below documentation for Copilot Studio multi tenant SSO
     
  • Sohom Rik Profile Picture
    53 on at
    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
  • adilei Profile Picture
    on at
    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
  • CU23011520-0 Profile Picture
    on at
    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.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Copilot Studio

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 251 Super User 2025 Season 2

#2
Romain The Low-Code Bearded Bear Profile Picture

Romain The Low-Code... 201 Super User 2025 Season 2

#3
S-Venkadesh Profile Picture

S-Venkadesh 93 Moderator

Last 30 days Overall leaderboard