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 41
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 41 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 137 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

September 2024 Newsletter…

September 2024 Community Newsletter…

Community Update Sept 16…

Power Platform Community Update…

Welcome to the new Power Platform Community!…

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

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 141,122

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 63,414

Leaderboard

Featured topics