pnp / provision-assist-m365

Provision Assist is a request and provisioning solution for Teams, Groups, SPO Sites and Viva Engage Communities in Microsoft 365.
MIT License
52 stars 5 forks source link

Flow "Check Space Availability" not running (only with sharing!) #55

Open wapster182 opened 6 months ago

wapster182 commented 6 months ago

Description

The flow "Check Space Availability" only works if shared with the users as "run-only", but this is not mentioned. In step 7 the sharing of the flows is only mentioned for changing and viewing flow runs to admin users, but not normal app users.

If the flow is not shared, there will be an error when checking for space availability with the verify button:

image

I troubleshooted this, if you give the app user permissions as run-only user it works. But what is the correct way to do this? Should it be shared to the user/group or the sharepoint site?

image

image

And should the connection be set as "Use this connection" or "Provided by run-only user"?:

image

Steps to reproduce

  1. Launch App as an normal user
  2. Try to verify the name of the collab space

Expected results

Flow runs without sharing (as described in the deployment guide)

Actual Results

Flow only runs with sharing

Solution component

Power Automate Flows

Operating system (environment)

Windows

Additional Info

No response

alexc-MSFT commented 6 months ago

@wapster182 Thanks for this, you are right, this is missing from the deployment guide.

Keep the connection as 'Use this connection'.

Would you like to help update the documentation? We would really appreciate the help.

Thanks

wapster182 commented 6 months ago

Thank you, glad I could help. I will use "Use this connection".

Should it be shared as run-only with a AAD group of users (or users directly) OR will it also work to share it with the SharePoint site?

wapster182 commented 6 months ago

Update: I tested it with "Use this connection" as below:

image

However, with this configuration the flow cannot be started, it will throw this error:

image

However, it works with this sharing type:

image

wapster182 commented 6 months ago

Another question: When sharing the Flow as run-only for users, they will get an auto-generated mail like this:

image

I think this will confuse users. How can we prevent this automated mail?

alexc-MSFT commented 6 months ago

@wapster182 thanks for looking into this, that connection configuration should be fine. I will update the documentation now.

As for the email, I have researched this and sadly there is no setting to disable it without creating a transport rule - https://powerusers.microsoft.com/t5/Using-Flows/share-flow-run-as-user-without-sending-email/td-p/852499.

alexc-MSFT commented 6 months ago

@wapster182 I've just tested with sharing run only users with the SharePoint list itself (SharePoint tab), this works and does not trigger an email either.

I've added it to the deployment guide, give it a try and let me know.

Thanks

wapster182 commented 6 months ago

Hi, I removed the user from the permission and used the SharePoint tab with the Site and List/Libary like the following:

image

However, this still throws an error:

image

I then tried the "Use this connection": image

But it also throws the error.

Do I need to Share the SharePoint site with the users to make it work this way? At the moment the user is only a site visitor and has the write permissions to the Request List (as described in the guide). Does your user in your successfull test has any other permissions to the SharePoint site?

alexc-MSFT commented 5 months ago

@wapster182 I've just tested this and it works in this scenario for me:

  1. User is in the Site Visitors group
  2. Permissions on the requests library has broken inheritance and the visitors group is given Edit access
  3. Flow is shared with the library as a run only user and selecting 'Use this connection'

Please can you test against my config above and let me know how it goes?

Thanks

wapster182 commented 5 months ago

Hi,

yes all of this is ticked. I have my user in the Visitors group, the requests library has broken inheritance and the flow is shared as "Use this connection".

wapster182 commented 5 months ago

It seems I do not have access rights to something, as the error says: image

alexc-MSFT commented 5 months ago

@wapster182 hmm that is odd, can you try removing and reattaching the flow to the app please?

wapster182 commented 5 months ago

@alexc-MSFT Could you explain this a bit? Am I going to do this in the Power App?