microsoft / CopilotStudioSamples

MIT License
324 stars 264 forks source link

Copilot Bot - SharePoint SSO Component - Timeout Issue #231

Open MangeshKhatal17 opened 3 months ago

MangeshKhatal17 commented 3 months ago

We deployed an SPFx package on our SharePoint site, configured with SSO authentication through Azure AAD App and Copilot bot. While some users can access the bot without any issues, others encounter problems when trying to open the iframe from the SPFx package—it continuously loads without success. These users are experiencing token timeout issues. A screenshot illustrating the problem is attached.

image (1)

adilei commented 3 months ago

Hey @MangeshKhatal17 , couple of questions:

  1. can you follow this URL and tell me if you're getting any exceptions?

image

  1. Are those users able to sign-in to the bot on the demo website, by clicking the "login" button and providing the magic code?
MangeshKhatal17 commented 3 months ago

Hi @adilei ,

  1. When we click on the URL from the console, we receive an attached message. However, this behavior is inconsistent as the same user can access the bot from a different machine.

image (2)

  1. By entering the 6-digit code from the Copilot Studio website, we can access the bot functionality.
adilei commented 3 months ago

Thanks, this just means you need to add a URI to your canvas app registration. The difference isn't between users - it's probably the case that some users access the SharePoint site with/without trailing slashes. Just makes sure both variations are in the app registration.

It's in the setup instructions :)

https://github.com/adilei/CopilotStudioSamples/blob/sharepoint-sso-component/SharePointSSOComponent/SETUP.md#step-2---register-your-sharepoint-site-as-a-custom-canvas

MangeshKhatal17 commented 3 months ago

We updated AAD app settings for Single-Page Application pointing to site collection with and without trailing slash. It started working for few users, but some users are still facing issue where iframe keeps on loading and throws timeout error in console.

adilei commented 3 months ago

We updated AAD app settings for Single-Page Application pointing to site collection with and without trailing slash. It started working for few users, but some users are still facing issue where iframe keeps on loading and throws timeout error in console.

Try checking for more detailed errors like in the previous round of troubleshooting

chenhui9111 commented 3 months ago

Hello, I encountered the same “time out” issue , and I followed the instructions to add SharePoint’s access address with a slash, but I still received the same error message on the image, and the user interface keeps displaying “loading”. I am a developer, and my own SharePoint’s Copilot is working normally.

adilei commented 3 months ago

Hello, I encountered the same “time out” issue , and I followed the instructions to add SharePoint’s access address with a slash, but I still received the same error message on the image, and the user interface keeps displaying “loading”. I am a developer, and my own SharePoint’s Copilot is working normally.

Make sure users can sign-in with the "login" button on the demo website