web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Configuring a connecti...
Power Automate
Answered

Configuring a connection reference in a cloud flow

(1) ShareShare
ReportReport
Posted on by 8
Apologies if this is not the right forum.  My questions crosses across a least a couple Power Apps concepts, so hopefully I'm in the right spot.  
 
We had a request to set up auto automated email reply for mail sent to a shared mailbox in Microsoft 365.  The trick is that they only wanted auto replies to go to external senders, not internal ones.  I couldn't see a way to control that with a standard automated reply in M365, so I ended up creating a standard flow, which worked great.  However, my manager was concerned that this flow was configured under my admin account and that should I move on, the process is tied to that account, which is a reasonable concern.  He suggested I try setting it up using a service principal instead.  After a bunch of reading, I created a solution with a cloud flow and was able to configured the cloud flow to run using the service principal.  However, the connection reference which makes the connection to the shared mailbox was still using my account. After more reading, I created a connection and a custom connector using the service principal. Then in Power Apps, I create a new connection reference using this new connection. The last step that I'm aware of is to associate this new connection reference with the cloud flow, and that's where I'm stuck. Articles I read suggest that I should be able to go into the cloud flow and just select the new connection reference, but when I edit the flow, it's not an option. I've attached a couple of screenshots, if it helps explain the situation. 
Categories:
I have the same question (0)
  • Suggested answer
    Pstork1 Profile Picture
    68,717 Most Valuable Professional on at
    I think you are confusing Connections and Connection References. A connection reference is a virtual wrapper that you can use to point to a specific connection. But Connection References aren't used in Power Apps unless its a shared connection like SQL. You can edit the connection reference that the flow is using directly in the solution file.  The one you've outlined in the screenshot looks to be one for SharePoint.  You want to edit the other one, which your flow is already using.  You can then point that at the specific connection being used in your power app for Outlook.

    ----------------------------------------------------------------------------------
    If this Post helped you, please click "Does this answer your question" and give it a like to help others in the community find the answer too!

    Paul Papanek Stork, MVP
    Blog: https://www.dontpapanic.com/blog
     
  • stampcoin Profile Picture
    5,058 Super User 2025 Season 2 on at
    I don't think you can use service principal for outlook, I might be wrong.
    As I konw not many connectors you can use service principal, for example dataverse.
    please consider create a service account for that shared mailbox and associated it to the account in your flow.
    if you are curious when to find adding service principal ( you might need some configuration before that).
    Go to Power Automate portal, then go to More, then click Discover more, then in the Data part, Connectors
     
     
     
  • TF-29070530-0 Profile Picture
    8 on at
     
    Thanks for the reply. The connection references in the "flow edit.jpg" picture are part of a cloud flow that's part of a solution under Power Apps.  Taking your advice and looking at modifying the connection reference in use to reference the new connection, the new connection isn't an option.  I'll post pics of the available connections and what I see when I try to modify the connection reference. To be clear, the connection I want to use is "Use SP for Office 365 Outlook".
     
    Thanks, 
    Todd
  • Pstork1 Profile Picture
    68,717 Most Valuable Professional on at
    Connection references are specific to the connector type. In your flow the connection reference is for an Office 365 Outlook connector. But based on the icon for your SP connection that isn't using the same Office 365 Outlook connector.  That's why it doesn't show up.  
     
    Do you have an article you can refer me to that you used to create the SP connection?
     
    Did you make the Service Principal the owner of the App and flow?

    ----------------------------------------------------------------------------------
    If this Post helped you, please click "Does this answer your question" and give it a like to help others in the community find the answer too!

    Paul Papanek Stork, MVP
    Blog: https://www.dontpapanic.com/blog
     
  • Verified answer
    Pstork1 Profile Picture
    68,717 Most Valuable Professional on at
    Ok, I took a closer look at your screenshots.  You created a custom connector and then used a service principal with that connector. Because its a custom connector it won't be visible to the connection reference you created for the Office Outlook action.  You should be able to create a connection reference in the solution and point it at the custom connector, but you will then be limited in the flow to using actions that are defined in that custom connector.  There is no way to use that connection with the regular Office Outlook connector.  Some connectors, like Dataverse, support the use of Service Principals. But most, and I think that includes Office Outlook, don't support them.  What most companies do is use a Service account instead.  Service accounts are regular user accounts that are only used to own or run Apps and Flows. Since the user isn't real they never leave the company. But they do require a license.  Check out the beginning of this video by Daniel Christian.  Power Platform Service Account Vs. Service Principal

    ----------------------------------------------------------------------------------
    If this Post helped you, please click "Does this answer your question" and give it a like to help others in the community find the answer too!

    Paul Papanek Stork, MVP
    Blog: https://www.dontpapanic.com/blog
     
  • TF-29070530-0 Profile Picture
    8 on at
     
    I'll try to track down the article I used to reference when I made the SP connection, but I'll just say now that in order to use a service principal, I had to create a custom connector, so I imagine that's why the icon is different.
  • Pstork1 Profile Picture
    68,717 Most Valuable Professional on at
    That was my conclusion. See my followup post.

    ----------------------------------------------------------------------------------
    If this Post helped you, please click "Does this answer your question" and give it a like to help others in the community find the answer too!

    Paul Papanek Stork, MVP
    Blog: https://www.dontpapanic.com/blog
     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 525 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard