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
Regular Visitor

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
Power Virtual Agents News & Announcements

Power Virtual Agents News & Announcements

Keep up to date with current events and community announcements in the Power Virtual Agents community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Virtual Agents Community Blog

Power Virtual Agents Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (5,249)