Skip to main content

Notifications

Power Platform Community / Forums / Bot Extensibility / Enable multitenant aut...
Bot Extensibility
Unanswered

Enable multitenant authentication for Copilot bot

Posted on by 25
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:
  • adilei Profile Picture
    adilei 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 Ghorai Profile Picture
    Sohom Ghorai 25 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
    Mahesh Chintha 37 on at
    Enable multitenant authentication for Copilot bot
    Refer to below documentation for Copilot Studio multi tenant SSO
     

Helpful resources

Quick Links

Exciting News for Copilot Studio Communi…

Get ready to experience a whole new level of engagement with the Copilot Studio…

Celebrating the May Super User of the…

LaurensM is an exceptional contributor to the Power Platform Community…

Check out the Copilot Studio Cookbook…

We are excited to announce our new Copilot Cookbook Gallery in the Community…

Leaderboard

#1
renatoromao Profile Picture

renatoromao 6,459

#2
Pstork1 Profile Picture

Pstork1 1,997

#3
Expiscornovus Profile Picture

Expiscornovus 1,708

Leaderboard

Featured topics