Copilot Studio adding `?web=1` to any sharepoint site url
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Quiet
- Domain
- developer-experience
Research direction
Start with the SharePoint PDF Page Citations sample at authoring/snippets/topics/sharepoint-pdf-page-citations and reproduce the behavior using the listed YAML SendActivity examples. Compare SharePoint and non-SharePoint URLs, including PDF fragments and folder paths; done means identifying the responsible post-processing behavior and confirming that valid SharePoint links no longer receive ?web=1.
Written by the indexing model from the issue text.
Description
What sample tool are you using?
SharePoint PDF Page Citations - https://github.com/microsoft/CopilotStudioSamples/tree/main/authoring/snippets/topics/sharepoint-pdf-page-citations
Describe the bug
Seems to be some post processing that is adding ?web=1 into all sharepoint.com links. This stops the direct page link from applying. Here's an example: https://*.sharepoint.com/sites/.../file.pdf?web=1#page=5. Seems to apply to both SharePoint and Dataverse backed Sharepoint.
To Reproduce
Steps to reproduce the behavior:
- Follow instructions for sample
- Test with any PDF
Expected behavior
No ?web=1 in the URL. Especially for PDFs
Screenshots
See below.
Additional context
I've only confirmed with *.sharepoint.com URLs.
I've tested with hard coded URLs in the topic. When any of our domains are hard coded into the topic, the ?web=1 does not get added.
I've also tried just writing out a SharePoint folder URL to the response and it still happens. Example: https://*.sharepoint.com/sites/.../Shared%20Documents/?web=1
Shows ?web=1 being added in SharePoint (including into the middle of a file name in certain situations):
Shows not being added to non-SharePoint:
I added this to the topic to test:
- kind: SendActivity
id: sendActivity_plainUrlTest
displayName: Send plain text test URL
activity: |-
Test SharePoint URL in code block:
```
https://some.sharepoint.com/sites/Name/Shared%20Documents/document-260101.pdf
```
- kind: SendActivity
id: sendActivity_plainUrlTestNoCodeBlock
displayName: Send plain text test URL (no code block)
activity: ="Test SharePoint URL: https://some.sharepoint.com/sites/Name/Shared%20Documents/document-260101.pdf"
- kind: SendActivity
id: sendActivity_plainUrlTestBugNoCodeBlock
displayName: Send plain text test URL (no code block)
activity: ="Test SharePoint URL (potential bug): https://some.sharepoint.com/sites/Name/Shared%20Documents/document(2026.01.01).pdf"
- kind: SendActivity
id: sendActivity_plainUrlTestNonSharepoint
displayName: Send plain text test URL
activity: |-
Test Non-SharePoint URL in code block:
```
https://some.domain.com/sites/Name/Shared%20Documents/document-260101.pdf
```
- kind: SendActivity
id: sendActivity_plainUrlTestNonSharePointNoCodeBlock
displayName: Send plain text test URL (no code block)
activity: ="Test Non-SharePoint URL: https://some.domain.com/sites/Name/Shared%20Documents/document-260101.pdf"
- Dominant language
- TypeScript
- Stars
- 797
- Forks
- 491
- PR merge metrics
- No merged PRs in 30d
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.
More from microsoft/CopilotStudioSamples
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
SharePointSSOComponent
microsoft/CopilotStudioSamples#537 · 1 assignee ·
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
microsoft/CopilotStudioSamples#532 · 1 comment ·
-
Unable to Deploy SPFx Agent to a Single SharePoint Site (Works Only with Tenant-Wide Deployment) Open
Difficulty 4/5 3-5 days Newbie friendliness 45/100
microsoft/CopilotStudioSamples#531 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
All issues in microsoft/CopilotStudioSamples
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
copse-dev/agent-pane#2953 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
bug clawsweeper:linked-pr-open clawsweeper:needs-live-repro clawsweeper:no-new-fix-pr impact:message-loss issue-rating: 🐚 platinum hermit P2 regression
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
calcite-components needs triage refactor
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Esri/calcite-design-system#15203 ·