Skip to main content

Notifications

Power Automate - Using Connectors
Unanswered

Can you connect to a Office 365 Shared Mailbox using a service principle instead of an actual user?

(0) ShareShare
ReportReport
Posted on by 94

I'm trying to make all my Flows not dependent on a user / password to make the connections.  I've fixed most but now I've got another connection to an Office 365 Shared Mailbox.  This is the trigger (when new mail arrives in shared mailbox) is the first step in a 1000+ action set of parent / child flows and I would like to use an Azure App Registration if that is possible.  That will keep the Flow from stopping when my client forces a change of password on my service user.

 

Any thoughts?

Ford

  • NickTT Profile Picture
    NickTT 211 on at
    Re: Can you connect to a Office 365 Shared Mailbox using a service principle instead of an actual user?

    I am looking to do the same thing. I have a Child Flow that will schedule meetings on behalf of the user. Was wondering if I could use the Azure App Shared Secret to do it instead. Then just permission the App to have Read\Write access to everyone's Calendar. 

  • ford_sopris Profile Picture
    ford_sopris 94 on at
    Re: Can you connect to a Office 365 Shared Mailbox using a service principle instead of an actual user?

    The client has no problem creating the App Registration, they just don't want to remove their password expiration policy so I'm trying to get away from using a named user for the connection.  

  • FLMike Profile Picture
    FLMike 31,580 on at
    Re: Can you connect to a Office 365 Shared Mailbox using a service principle instead of an actual user?

    Hi,

     

    If this is your client, how do you plan to register the App in their AD, as that is where it would have to be if you plan to read email coming from their tenant

    Cheers
    If you like my answer, please Mark it as Resolved, and give it a thumbs up, so it can help others
    Thank You
    Michael Gernaey MCT | MCSE | MCP | Self-Contractor| Ex-Microsoft
    https://gernaeysoftware.com
    LinkedIn: https://www.linkedin.com/in/michaelgernaey.

  • ford_sopris Profile Picture
    ford_sopris 94 on at
    Re: Can you connect to a Office 365 Shared Mailbox using a service principle instead of an actual user?

    Thanks for the info Michael.  From what it looks like, I cannot use this "Send an HTTP request" as a trigger (which makes sense) and I would have to put it on a recurring schedule to constantly check for new messages.  I'd rather try to figure out if I can continue to use it as a trigger (currently use the "When a new email arrives" trigger).

  • FLMike Profile Picture
    FLMike 31,580 on at
    Re: Can you connect to a Office 365 Shared Mailbox using a service principle instead of an actual user?

    Hi Ford,

     

    I am super sorry I am wasted and about to sleep, but I am pretty sure you can use a Managed Identity, but I believe you need to use Power Shell to grant them actual Mail.Read access, and then you create your app registration and use the HTTP connector with the client secret etc.

     

    and I know for sure you can make the flow run as a managed identity.

    Cheers
    If you like my answer, please Mark it as Resolved, and give it a thumbs up, so it can help others
    Thank You
    Michael Gernaey MCT | MCSE | MCP | Self-Contractor| Ex-Microsoft
    https://gernaeysoftware.com
    LinkedIn: https://www.linkedin.com/in/michaelgernaey

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,636

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,942

Leaderboard

Featured topics