cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper I
Helper I

Trigger for SharePoint Online site user permissions change?

Is there any way of catching when there is a change to the members / permissions of a SharePoint Online site?

I just want to trigger an e-mail to myself when any of the other admins add or change users for our site.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User
Super User

Re: Trigger for SharePoint Online site user permissions change?

@BungleBrain 

 

Yes it is possible but very complex flow you need to design.

Idea-

1. Scheduled Trigger

2. Send a HTTP request to SharePoint. Use GET method and URI-_api/Web/SiteGroups/GetByID(Your user group ID)/users

3. Parse JSON

4. Store all users in a variable.

5. once you store users, count number of users.

6. compare counts from previous count (you need to store previous count in a list)

7. if count mismatch - trigger email.

8. if user changed - you need to compare each user using collection.

 

if you need screens let me know.

Thanks

Hardesh

 

View solution in original post

2 REPLIES 2
Highlighted
Super User
Super User

Re: Trigger for SharePoint Online site user permissions change?

@BungleBrain 

 

Yes it is possible but very complex flow you need to design.

Idea-

1. Scheduled Trigger

2. Send a HTTP request to SharePoint. Use GET method and URI-_api/Web/SiteGroups/GetByID(Your user group ID)/users

3. Parse JSON

4. Store all users in a variable.

5. once you store users, count number of users.

6. compare counts from previous count (you need to store previous count in a list)

7. if count mismatch - trigger email.

8. if user changed - you need to compare each user using collection.

 

if you need screens let me know.

Thanks

Hardesh

 

View solution in original post

Highlighted
Helper I
Helper I

Re: Trigger for SharePoint Online site user permissions change?

@Hardesh15 , thanks for the suggestion / tips. It makes general sense to me. I might half-implement it just to occasionally pull the user list via the HTTP request.

Part of me was hoping that the user permissions detail for a site was held in some special list already that I could sneakily access.

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Upcoming Events

Experience what’s next for Power Automate

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Top Solution Authors
Users online (7,408)