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"
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=1into allsharepoint.comlinks. 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:
Expected behavior
No
?web=1in the URL. Especially for PDFsScreenshots
See below.
Additional context
I've only confirmed with
*.sharepoint.comURLs.I've tested with hard coded URLs in the topic. When any of our domains are hard coded into the topic, the
?web=1does 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=1Shows
?web=1being 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: