SOLVED

See/change who is subscribed programmatically?

Valued Contributor
It's there a way (PowerShell, graph, etc) to query a group membership and see who is "subscribed" to receive notifications in their inbox?

Similarly, is there a way to subscribe or unsubscribe a particular user?
8 Replies

Unless I'm missing something, the Subscriber link type is what you should look at:

 

Get-UnifiedGroupLinks firstgroup -LinkType Subscriber

Give also a try to PnP PowerShell cmdlets that allow to work with Groups
More specifically, I am not looking for just members, I am looking for members who are "subscribed" to receive emails in their inbox, versus those that are members of the group and unsubscribed.

If possible, I need a way to mass subscribe (not join), or mass unsubscribe users programmatically, rather than their choice.
Vasils command does show the subscibers. I have no clue though on how to manually subscribe users.
I'm interested in this as well.
best response confirmed by Brent Ellis (Valued Contributor)
Solution

You can use the Add-UnifiedGroupLinks cmdlet for that, simply set the member type as subscriber. It can be both a member and a subscriber, comparing those two will give you the list of which members are subscribers, etc.

Should have did a bit more research on those commands, didnt realize it treated Members/Subscribers differently!  

 

Quite simply:

  • All subscribers are members
  • Not all members are subscribers

 

Add a user as a member only:

Add-UnifiedGroupLinks -Identity GROUP -LinkType Members -Links user@email.com

 

Add a user as a member or subscriber, and/or change a member to a member+subscriber

Add-UnifiedGroupLinks -Identity GROUP -LinkType Subscribers -Links user@email.com

 

Remove a user from the group:

Remove-UnifiedGroupLinks -Identity GROUP -LinkType Members -Links user@email.com

 

Remove a subscription, but not a membership

Remove-UnifiedGroupLinks -Identity GROUP -LinkType Subscribers -Links user@email.com

 

 

Would be nice to have a UI for this to be managed..