Forum Discussion
Nigel_Price9911
Oct 06, 2021Iron Contributor
Using Service principals With SharePoint
Hi
Does anyone know if I can use Service Principals with SharePoint Online ?
If so how ?
Can I also use Service Principals with SharePoint connectors in PowerAutomate Flow ?
Thanks
Nigel
3 Replies
- SureshkumarChermaduraiCopper ContributorHi,
You can create a new app registration and give access to SharePoint using PnP Powershell script. Then finally connect to a SharePoint site using the App details without any MFA. Refer below link to create Service Principal and give access to SharePoint.
https://www.leonarmston.com/2022/01/pnp-powershell-csom-now-works-with-sharepoint-sites-selected-permission-using-azure-ad-app/
Refer below link to connect SharePoint using Active Directory OAuth through Logic Apps. You can follow the same with Power Automate, but HTTP connector in Power Automate is a Premium connector.
https://spblog.net/post/2021/06/08/how-to-call-sharepoint-rest-api-with-application-permissions-from-azure-logic-app-with-azure-key-vault-and-managed-identity - MrKinsteCopper Contributor
I would love to know this also. It seems that the SharePoint connector does not support using a Service Principal, only user accounts.
I noticed the Dataverse connector supports the Service Principal option.
- MrKinsteCopper ContributorIt looks like you might be able to use a Service Principal with the HTTP Request connector, and make SharePoint REST queries which use an authorization token. https://docs.microsoft.com/en-us/learn/modules/integration-http-connector/2-rest-service
The HTTP Request requires a premium Power Apps or Power Automate license for the user(s) running the Flow.