Forum Discussion

Nigel_Price9911's avatar
Nigel_Price9911
Iron Contributor
Oct 06, 2021

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

  • Hi,

    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
  • MrKinste's avatar
    MrKinste
    Copper Contributor

    Nigel_Price9911 

    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.

    • MrKinste's avatar
      MrKinste
      Copper Contributor
      It 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.

Resources