Skip to main content

Notifications

Copilot Studio - Bot Extensibility
Unanswered

Enable multitenant authentication for Copilot bot

(2) 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:
  • 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 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
    Mahesh Chintha 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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,526

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,907

Leaderboard

Featured topics