microsoft / microsoft/CopilotStudioSamples

Issue with extension authenticating on site pages that aren't explicitly defined in App Registration

Open
#303 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
797
Forks
491
PR merge metrics
No merged PRs in 30d

Description

SharePoint SSO Component

I have defined the home page of my SharePoint site (including a trailing slash) as a redirect URI in the Single-page Application redirect URI section of the App Registration. I can authenticate whenever I am on this home page, but when I navigate to any other page within the site I am greeted with the following error:

Unsafe attempt to initiate navigation for frame with origin 'https://.sharepoint.com' from frame with URL 'https://login.microsoftonline.com/****************'. The frame attempting navigation of the top-level window is sandboxed, but the flag of 'allow-top-navigation' or 'allow-top-navigation-by-user-activation' is not set

Is it the case that I have to define each site page in my site as a redirect URI? I tried adding a wildcard at the end of the URI but this is not allowed.

Any help would be appreciated. Thanks!

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the SharePoint SSO Component and reproduce authentication from the configured home-page redirect URI and from another site page. Investigate the reported sandboxed-frame navigation error and determine the redirect-URI behavior expected for pages that are not explicitly defined. Done means the required configuration or a concrete component change is identified and verified on both page types.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
authentication
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.