Wednesday, 8 January 2020

Unauthorized error while authenticating Sharepoint REST API using Python

I am trying to download a file from a SharePoint Online data library via REST API which uses a multi-factor ADFS authentication, so far I found these posts(Post1, Post2) which talk about sending a SAML request to STS to receive a security token from https://login.microsoftonline.com/extSTS.srf, I have found multiple examples online which uses the same method to authenticate their requests. However, when I send the SAML request to the above Microsoft URL, I receive the error below.

AADSTS50126: Error validating credentials due to invalid username or password.

I have appropriate access to the SharePoint data library as I was able to get a valid response to an API request(to check available lists and not for authentication) when using a browser with authenticated session. Any idea on what I might be doing wrong or even if authentication is possible for MFA secured SharePoint library.



from Unauthorized error while authenticating Sharepoint REST API using Python

No comments:

Post a Comment