Skip to main content

Notifications

Community site session details

Community site session details

Session Id : DkKIPOcdzqHdFpcQwMfpoc
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,075 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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,662 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,004 Most Valuable Professional

Leaderboard

Featured topics

Loading started