Forum Discussion
lucafabbri365
Aug 31, 2020Brass Contributor
SharePoint access from third party application
Hello Community, I'm writing to ask for a question regarding SharePoint Online access from third party application. Basically I have a third party application written in Python (on-premise) needs t...
- Aug 31, 2020Graph is a framework, REST is the method you use to access Graph and although there are other ways to access SharePoint, I’ve found Graph to be the easiest and provides additional functionality that you can use to scale.
I’ve never done it from Python but even from C#, the Microsoft delivered packages do nothing more than call REST end points.
If you want to use a service principal, create an application in Azure and assign it the required application (not delegated) roles.
From there, start exploring the end points by using the documentation. These may help.
https://docs.microsoft.com/en-us/graph/api/resources/sharepoint?view=graph-rest-1.0#sharepoint-api-root-resources
https://docs.microsoft.com/en-us/graph/auth-v2-service
https://docs.microsoft.com/en-us/graph/api/overview?view=graph-rest-1.0
Good luck!
BradD
Aug 31, 2020Brass Contributor
Graph is a framework, REST is the method you use to access Graph and although there are other ways to access SharePoint, I’ve found Graph to be the easiest and provides additional functionality that you can use to scale.
I’ve never done it from Python but even from C#, the Microsoft delivered packages do nothing more than call REST end points.
If you want to use a service principal, create an application in Azure and assign it the required application (not delegated) roles.
From there, start exploring the end points by using the documentation. These may help.
https://docs.microsoft.com/en-us/graph/api/resources/sharepoint?view=graph-rest-1.0#sharepoint-api-root-resources
https://docs.microsoft.com/en-us/graph/auth-v2-service
https://docs.microsoft.com/en-us/graph/api/overview?view=graph-rest-1.0
Good luck!
I’ve never done it from Python but even from C#, the Microsoft delivered packages do nothing more than call REST end points.
If you want to use a service principal, create an application in Azure and assign it the required application (not delegated) roles.
From there, start exploring the end points by using the documentation. These may help.
https://docs.microsoft.com/en-us/graph/api/resources/sharepoint?view=graph-rest-1.0#sharepoint-api-root-resources
https://docs.microsoft.com/en-us/graph/auth-v2-service
https://docs.microsoft.com/en-us/graph/api/overview?view=graph-rest-1.0
Good luck!
lucafabbri365
Aug 31, 2020Brass Contributor
thank you very much for useful information.
You are right, REST is an accessing method.
So as I discovered, another method is to use https://docs.microsoft.com/en-us/sharepoint/dev/sp-add-ins/get-to-know-the-sharepoint-rest-service?tabs=csom (no Microsoft Graph) ?
Regarding authentication, if I use Service Principal with MSFT Graph, then I have to create an Azure app, but if I use SharePoint REST API v1, should I register Azure app too (link: https://docs.microsoft.com/en-us/sharepoint/dev/solution-guidance/security-apponly-azuread) to use server-side auth. ?
Thank you again,
Luca