Down the Rabbit Hole! External Sharing of SP List with powerapps Form & Email notification

Occasional Contributor

I have a simple SP online list which uses a NEW/EDIT form customized in powerapps. It works flawlessly when I am using it myself as the author, but I needed to share it externally, so I shared with with my own personal O365 account for testing, as deployment needs to be seamless to "real" external users.

When I log in on my home PC with my personal O365 "school/work" account, I see several issues:

1. The list is visible, but the data in it is old. I don't mean some data is missing - I mean the actual values for the same records are a day old, and records created earlier today are not visible at all. I can see the new data on my work laptop, and it has more lines, and newer data.

2. When I click on Title field, I get the "almost there" message, with "Office 365 Outlook" connection needing "fixed". I can't fix this whatever I do. Authentication Error - though I AM logged into Sharepoint with my O365 account.

3. The powerapp canvas / Form isn't displaying at all.

 

When I remove the Office 365 Outlook connection from the Flow, the powerapp starts up normally in the external environment (obviously with no email functionality though). I will try a different connector to support email.
 
Item 1 above is still the same though - the list data is still old.
No different email connector available ("Mail" is not permitted apparently!) so I have just put the email address into a Compose, to see if it will pass correctly to the flow.
 
It did pass no problem. I will take a copy of the flow and try adding the Office365 outlook Connector back in.
 
Okay so as soon as I add the O365OL connector back in, the external powerapp falls over with an authentication error. I wonder if the connector is trying to log in using my work account - as per the connection configured in the app, but obviously unable to do so on an external machine. I need the connection to be set up for a run-only user. How to do this?

This is getting silly now.
I'm reading that the best way is to split the flow into a parent/child pair, so that the run-only user doesn't have to interface with the O365OL connection. Turns out that child flows are only available in Solutions. So I rewrite my flow into a solution. (First time messing with solutions)
 
So now I just have to call the parent flow, which has no awkward connectors, from my app. Simple...
 
Not so. My app can only access "My Flows", and doesn't see anything in a solution. Of course, I can't put my app into a solution because its linked to the Sharepoint List. This is getting pathetic!
Maybe I'll see if there's a way to call a flow from another flow, while both are still in My Flows.
 
Apparently, there's a way to do nested flows using HTTP requests - but of course...
"Your flow was saved, but could not be enabled because it conflicts with the company data loss prevention policies."
 
Can someone please point me in the right direction before I throw this laptop out the window?
1 Reply

So I discovered a lot about this,and i think I have a way out.
1. The "old data" was because I had versioning enabled, and users set to view only Approved items (or at least "approved item VERSIONS - which were old of course". All the recent documents were set up "pending" state, due to me doing an "update item" in the flow, after the approval. I have now set users to be able to view drafts, but also added a "Set Approval Status" Step at the end of my flow (one for reject, one for approve)
2. It is true that no matter what I do, I cannot get the O365 connector to work with a Runtime User, and I also can't get a child flow to isolate my powerapp from the O365 connector.
SO
I'm going to put a helper column in the database which I will set to "1" when an email needs to be sent. I'll have another flow, with a change trigger, conditional on seeing this "1". At that point, it will pull the data, send the email and reset the trigger to "0" to avoid recursion.
I'm hoping that will work.