cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

How to configure SSO on a intranet page (SharePoint)

Hi,

 

I have been trying to configure SSO on our organization SharePoint website using PVA. But I don't see it to be working. I have been referring to the below URLs:

 

SSO doc 

https://docs.microsoft.com/en-us/power-virtual-agents/configure-sso#:~:text=Power%20Virtual%20Agents....

 

GitHub Sample code doc

https://github.com/microsoft/PowerVirtualAgentsSamples/blob/master/BuildYourOwnCanvasSamples/3.singl...


I have created a HTML file adding the SSO code provided from the above doc and published in the SharePoint website. I do not wish to see the login sign in card which asks to pass the token rather I need to Sign-in directly once I click the Chatbot button.

 

pva1.png

 

I have also posted regarding the same in the past as well. But no luck. Any help is much appreciated. 

 

Regards,

Hemanth

26 REPLIES 26
skandadai
New Member

You also need to add the sharepoint homepage where this bot will be hosted as the MSAL javascript code needs to create a new token and redirect. If you dont add then redirection will fail with above error.

Anonymous
Not applicable

Hi @neeraja 

 

You don't have to add extra code for the image.

 

<img id="myBtn" alt="image" src="<Add image url>">

 

You just have to pass the image url to the above code and where ever required.

Anonymous
Not applicable

@neeraja 

 

Can you provide few snapshots of the issue that your facing.

For the Authentication app registration on Azure you have to pass https://token.botframework.com/.auth/web/redirect as the redirect url.

For the SSO Canvas app registration on Azure you have to pass the Bot hosted page.

neeraja
Helper I
Helper I

I am able to achieve the SSO with the custom canvas HTML hosted at azure web app. The modification I did is there is no need of 2 app registrations. I have only used one app registration in that I have given token URL and my custom canvas hosted URL. 

It works fine!

@aksridhar1 

Hi

 

I am having an issue with SSO.   Would you mind posting the code for the index.html you used here so i can compare it to what i have done?

 

thanks

 

Hello @h4tgdev 

 

Let me know what is the error you are getting. The code is already posted as part of this thread. Please see the thread from beginning

 

Sridhar

h4tgdev
Regular Visitor

Hello @aksridhar1 

 

Thanks for the pointer I didn't realize the code was in this thread.  I have most of it working but I am getting this error:

 

index.html:310 Uncaught (in promise) ReferenceError: $ is not defined
at index.html:310:11

 

This is the line that is failing:

$("#divPopup").modal({ backdrop: "static", keyboard: false });

 

If I comment this line out it does a redirect to get the auth and it works (This scenario is using a static website via azure storage). 

 

My goal is to put this code in a PowerApps Portal and when I remove this line it redirects me to the sign in but after i sign in it keeps sending me back to the sign popup.

 

thanks

 

thanks

 

 

Helpful resources

Announcements
Canadian Cloud 2022 768x460.png

Register for a free PVA chatbot creation workshop.

Learn how to respond rapidly to your customers and employees at scale, using intelligent conversational chatbots.

PVA Community Blog Build Carousel (1) (1).png

What does the community say?

Discover what our community thinks about the announcements at Build 2022.

June 14th PVA AMA Carousel (up on May 25th, take down June 15th) (1).png

'Ask Microsoft Anything' about Power Virtual Agents!

Join the community to ask questions and provide helpful answers about Microsoft's conversational AI and Power Virtual Agents.

Users online (2,066)