1 minute reading time (75 words)

Get all Yammer groups using REST API and PowerShell

How to get all Yammer groups names and ids using REST API PowerShell and export to csv

Get all Yammer group names and ids using PowerShell

$token = "YOUR-TOKEN"
$yammerbaseurl = "https://www.yammer.com/api/v1/groups.json"
$headers = @{ "Authorization" = "Bearer "+$token }
$webRequest = Invoke-WebRequest -Uri $yammerbaseurl -Method Get -Headers $Headers

$groups = $webRequest.Content | ConvertFrom-Json
$groups | Select-Object id, name

# export to csv 
$groups |  Select-Object id, name | Export-Csv "C:\temp\yammer-groups.csv" 

Related Posts

 

Comments

No comments made yet. Be the first to submit a comment
Already Registered? Login Here
Saturday, 23 September 2023
You can help support this website by buying me a coffee!
Buy Me A Coffee