Skip to main content

Notifications

Community site session details

Community site session details

Session Id : +/fU2cqY9I4WyC2gx9yaxp
Power Automate - Using Connectors
Unanswered

Connecting to sharepoint, Outlook 365 and other services using a service account / service principal

Like (0) ShareShare
ReportReport
Posted on 19 Jan 2024 12:36:01 by 90

We often face issues where a user has left the organization or moved to a different role & had permissions altered.
This causes issues in their flows that connect to sharepoint or Outlook 365 to send mails.
This limitation is preventing us really utilizing the power automate as an enterprise grade platform.


Is it possible to use a service principal to connect to these services, instead of the users?


Categories:
  • ANB Profile Picture
    7,094 Super User 2025 Season 1 on 20 Jan 2024 at 07:17:41
    Re: Connecting to sharepoint, Outlook 365 and other services using a service account / service principal

    Hi @winston_smyth , As my knowledge, SharePoint Online and Office 365 Outlook connectors does not support service principal. Check this for SHarePoint: https://techcommunity.microsoft.com/t5/power-apps-power-automate/using-service-principals-with-sharepoint/m-p/2816413

     

    It is available for Dataverse.

    However, you can create service account with proper licenses and create the connections using this service account rather than creating with actual user account. And then upload the credentials of this service account in Azure vault and share the azure vault to team member for further uses.

     

    There is still an alternate if you want to use service principal, then you might have to use graph API/ SharePoint RESR API to consumes the end points of SharePoint and Office 365 Outlook service which are available.

     

    Here are the general steps to use a service principal in Power Automate:

    Create an App Registration:

    1. Go to the Azure portal (https://portal.azure.com/).
    2. Navigate to "Azure Active Directory" > "App registrations" > "New registration."
    3. Fill in the required details, such as name and supported account types.
    4. Note down the "Application (client) ID" and "Directory (tenant) ID" for later use.

    Generate Client Secret:

    1. In the app registration, go to "Certificates & secrets" and create a new client secret.
    2. Note down the generated secret value or save it in Azure Vault.


    Assign Appropriate Permissions:

    1. In the app registration, go to "API permissions."
    2. Add the necessary permissions for the services your Power Automate flows interact with (e.g., Microsoft Graph, SharePoint).
    3. Grant admin consent if required.


    Use Service Principal in Power Automate:

    1. In your Power Automate flow, use the "HTTP" or "HTTP with Azure AD" connector.
    2. Configure the connector with the endpoint of the service you are connecting to (e.g., Microsoft Graph or SharePoint).
    3. Use the client ID, client secret, and tenant ID obtained during the app registration.

    -----------------------------------------------------------------------------------------------------------------------------

    I hope this helps.

    Please click Accept as solution ✅ if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs up.👍

    Thanks,
    ANB


Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Automate - Using Connectors

#1
DBO_DV Profile Picture

DBO_DV 25 Super User 2025 Season 1

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 10 Super User 2025 Season 1

#3
CU09051456-0 Profile Picture

CU09051456-0 8

Overall leaderboard

Featured topics

Loading started