Grant access to sharepoint site

We have a requirement to provide a manager full permissions to a terminated account’s sharepoint site.

Current process is managed by a powershell script.

I’m looking at using a workflow. Is there a way to do this without using custom http actions, etc?

I don’t think there is a direct or easy way to do this using Graph API and infact I don’t think there is an API to get the list of site collection owned by a user. one way to do this You might have to figure out which groups that terminated user belongs to, replace the terminated user with the manager for sites using groups

Thanks @sunnyajmera

The current process is:

  1. Get user’s site name/url using Get-SPOSite cmdlet
  2. Set-SPOUser -Site $userSite.Url -LoginName $mgrUPN -IsSiteCollectionAdmin $true

Are you saying to do this with http workflow action using Graph API ?

Yes, I think you can do this using REST API (via _api/web/roleassignments to remove the terminated user and add the manager as a site collection admin or owner.

We have SharePointOnline set up as a connected app (using the SPO connector)…
Wondering if this can also be done maybe using a transform/rule? When the LCS is set to terminated, the transform or rule can be triggered?

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.