Hi!
I have a list of tasks that I assign to employees.
I want each employee and his manager to see only their task.
Is it possible to give permissions this way using Power Automate?
Hi!
I have a list of tasks that I assign to employees.
I want each employee and his manager to see only their task.
Is it possible to give permissions this way using Power Automate?
The problem with that setting is that when it is turned on the only people who can see the items are the person who created them and administrators. So for it to work in his situation either the employee or the manager would need to be an admin. I don't recommend making all the managers admins.
@Pstork1 I am just guessing if this combination can be a valid alternative to REST calls:
1.- Play with the item level permissions, to ensure only the users creating items will be able to read and edit them
2.- Assuming flow is executed with an SP site administrator credentials, use the action block https://learn.microsoft.com/en-us/connectors/sharepointonline/#grant-access-to-an-item-or-a-folder in order to ensure the target employee and the manager does also read+edit access to their related items
Contributions like the ones you do make this community great! Thanx for sharing your time with us!!
Your response was perfectly accurate. I've just seen multiple people who think sharing changes security or that security overrides the List Item settings. Unfortunately, they soon find that your third link is what they want. I just wish there was an action in the connector that handled it without having to struggle with REST.
@Pstork1 Thanx for being much more precise than me!
@xvzms The information provided by @efialttes is accurate. But don't be misled by the first two links. The first only deals with sharing an item and won't change the underlying item level permissions. And the settings in the second will prevent anyone other than Admin users and the person who created the item from seeing it. So if the user creates it the Manager will only see if they are an admin. For your scenario you need the REST calls described in the third link.
@xvzms
I would suggest you to explore the following action block...
https://learn.microsoft.com/en-us/connectors/sharepointonline/#grant-access-to-an-item-or-a-folder
...and if any of them (employee, manager) are the ones creating the items, combine it with this config:
https://sharepointstuff.com/2022/12/15/create-views-in-sharepoint-that-only-show-items-created-by-current-user/
If you need something more sophisticated, I guess you will need to invoke REST API by means of:
https://learn.microsoft.com/en-us/connectors/sharepointonline/#send-an-http-request-to-sharepoint
Hope this helps