microsoft / microsoft/CopilotStudioSamples
Error "Unable to connect" when opening the page on SSO
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 797
- Forks
- 491
- PR merge metrics
- No merged PRs in 30d
Description
What sample tool are you using?
3.single-sign-on
https://github.com/microsoft/CopilotStudioSamples/blob/master/BuildYourOwnCanvasSamples/3.single-sign-on/index.html
Describe the bug
after editing the page to fill the four variables
- clienID
- authority
- theURL
- "My-custom-prefix"
, I get the following result showing that the copilot can’t connect:
To Reproduce
Steps to reproduce the behavior:
- Donwload the file https://github.com/microsoft/CopilotStudioSamples/blob/master/BuildYourOwnCanvasSamples/3.single-sign-on/index.html locally
- Replace the four variables above with the appropriate values
- Save the page
- Run a web server (e.g. python -m http.server or a nodejs server that integrates CORS)
- Open the page
Expected behavior
The authentication window is shown which, instead, does NOT show up; instead, the embedded copilot says "connecting..." for half a second, followed by the "Unable to connect" error
Screenshots
Please check the screenshot above
Additional context
- I followed exactly the same steps indicated in the article https://learn.microsoft.com/en-us/microsoft-copilot-studio/configure-sso?tabs=webApp.
- I also watched this video https://www.youtube.com/watch?v=xk45a4qEM8c where it works, but it's using an older version of the file.
- I tried adding the following instruction at the beginning of "async function main()" as suggested by the article, but the behaviour is the same
if (clientApplication.getAccount() == null) { await clientApplication.loginPopup(requestObj).then(onSignin).catch(function (error) {console.log(error) }); } - popups are enabled
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with BuildYourOwnCanvasSamples/3.single-sign-on/index.html and reproduce the issue using the four documented values and a local web server. Compare the current sample with the linked SSO article and older video, then verify that the authentication window appears and the embedded copilot connects instead of showing "Unable to connect."
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- authentication, web-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100