Add Site Collection Admin

How to add the site collection admin role to a user in a single SharePoint Online site collection using a Power Automate flow.

URI

Headers

Body

Screenshot with example

Sample data
User Id – in my sample I am updating the role for Jane Doe, who has principalId 14 in my site collection.

addsitecollectionadmin

Copy/paste example

Resources

User.IsSiteAdmin Property
Web.GetUserById method

That’s it, Happy testing!

You may also like...

3 Responses

  1. Eliot says:

    Hrm!

    I am trying to attempt this with a ‘Teams Channel Site’ (they’re RASCALS!! XD) and the flow just hangs on this POST request … whether I go ‘verbose’ or ‘nometadata’ … WAH! (lol) … or even if I include contextInfo!

    I am a SharePoint Admin on the tenancy and on the ‘parent’ site itself. This is dastardly!!

    XD
    Eliot
    ( not asking for assistance, Dennis, just putting this out into the ether to show that some of us dumbos might yet have issue with it 😉 … … no@no.nope

  2. Eliot says:

    BTW = I have found (in my archives) a way to accomplish this via another SharePoint API endpoint … will try to post it later today.

  3. Dennis says:

    Hi Eliot,

    Thanks for reporting this back. I didn’t test this on a Teams Channel Site. Definitely interested in that other endpoint you used 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.