microsoft / CopilotStudioSamples

MIT License
332 stars 268 forks source link

SharePointSSO login only returning "Proof Key for Code Exchange" error #271

Open KRhoadesHyp opened 3 days ago

KRhoadesHyp commented 3 days ago

@adilei

What sample tool are you using? SharePointSSOComponent

Describe the bug No matter how I set up the component or configure the apps I am receiving a AADSTS9002325: Proof Key for Code Exchange is required for cross-origin authorization code redemption. error when trying to log into the bot. I have spent 2 days on this and would love to get it working!

To Reproduce Steps to reproduce the behavior:

  1. click on the button in the SharEPoint site to launch the chat
  2. click on the "LOGIN" button

Expected behavior After clicking on "Login" I would expect it to authenticate and return to the bot.

Screenshots Image Image

App Registration (SPA): Image

Bot Security: Image

Changing the parameters in the URL above to "response_type=token&scope=openid" results in: Image

KRhoadesHyp commented 2 days ago

Adding the redirect URL as Web does at least let me log into the bot with a code (not SSO). Moving the redirect URL to SPA always returns the “AADSTS9002325: Proof Key for Code Exchange is required for cross-origin authorization code redemption.” error