Skip to content

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.

2 participants