Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support different sites in Sharepoint, requires full site URL when fetching digest #76

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Jamie-
Copy link

@Jamie- Jamie- commented Sep 20, 2023

Most endpoints in the SPOL auth class appear to need just the Sharepoint FQDN (e.g. mycompany.sharepoint.com) However for the digest to be valid when working with sites (e.g. mycompany.sharepoint.com/sites/MySite), the digest needs to be fetched for the correct site.

With these changes, when working with sites, connect using e.g.

sharepy.connect("https://mycompany.sharepoint.com/sites/MySite")

Although the code is robust to with/without https?:// and with/without trailing /.

Without these changes, when trying to upload a file to a Sharepoint site (e.g. mycompany.sharepoint.com/sites/MySite) I get the error:

The security validation for this page is invalid. Click Back in your Web browser, refresh the page, and try your operation again.

…tching digest

Most endpoints in the SPOL auth class appear to need just the Sharepoint FQDN (e.g. mycompany.sharepoint.com)
However for the digest to be valid when working with sites (e.g. mycompany.sharepoint.com/sites/MySite), the digest needs to be fetched for the correct site.

With these changes, when working with sites, connect using e.g.
```
sharepy.connect("https://mycompany.sharepoint.com/sites/MySite")
```
Although the code is robust to with/without "https?://" and with/without trailing "/"
@dltacube
Copy link

This PR fixed an issue I was having as well. Any interest in adding this work @JonathanHolvey?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants