Adding multiple users to yammer group via PowerShell or Python

269 Views Asked by At

Looking for a way through which I can add multiple users to a yammer group.

I tried this, but it doesn't work.

Is there any PowerShell scripts or an option available on the UI to add multiple users? I also tried to separate the users via comma delimiters but this doesn't work either.

Have also tried adding a AAD group but that didn't work either (the group doesn't appears in the dropdown).

Below is the PS script:

# Input Parameters    
$developerToken = "999-test"   
$uri="https://www.yammer.com/api/v1/group_memberships.json"  
$headers = @{ Authorization=("Bearer " + $developerToken) }     
$body=@{group_id="groupid";email="[email protected]"}   
  
# Invoke Web Request - Add user to Group  
$webRequest = Invoke-WebRequest –Uri $uri –Method POST -Headers $headers -Body $body
0

There are 0 best solutions below