Based on my research and this Video, I was under the impression that switching between the Graph API and the SharePoint REST API should be pretty straight forward.
After obtaining an OAuth2 token, I am able to access the Graph API with a call such as:
https://graph.microsoft.com/v1.0/sites/root/drives
.However calling the SharePoint Api as documented:
http://<my_tenant>/site/_api/lists
fails with:{"error_description":"Invalid issuer or signature."}
Is a different token required for the REST API? How can I acquire it?
authentication.asmx
soap endpoint which haslogin
method, which returns a access token that can be further used while session lasts. Will that help? – Swayam Siddha Jul 13 '17 at 9:46from zeep import Client
client = Client('https://<mysite>.sharepoint.com/_vti_bin/authentication.asmx?WSDL')
client.service.Login(username='<my_user>@<mysite>.onmicrosoft.com', password='<my password>') returns: { 'CookieName': None, 'ErrorCode': 'PasswordNotMatch', 'TimeoutSeconds': 0 } And I have checked and double checked that the credentials are correct. – James Jul 13 '17 at 10:45