What it is
A PowerShell sample that signs in interactively with MSAL.PS, submits a request to the Yammer Files Export API for a start and end date, waits for the export to be packaged, and downloads the resulting zip file or files into a dated folder together with a script log. In native-mode networks no files are downloaded; you get a CSV of file information that includes each file's URL.
Why use it
- Archive files stored in Viva Engage (Yammer) storage for a date range.
- The API packages files into zip files on the back end, which the README recommends over downloading files with the Network Data Export script for large volumes.
- Writes a detailed log next to each export for troubleshooting.
How to use it
- Create a Microsoft Entra app registration with the delegated Yammer
access_as_userpermission and install the module withInstall-Module MSAL.PS. - Set
$ClientId,$TenantId,$RedirectUri, and$rootPathnear the top of the script. - Run with a start and end date in YYYY-MM-DD format. Use shorter date windows if packaging fails:
.\Export-EngageFiles.ps1 -startdate 2023-01-14 -enddate 2023-01-31Prerequisites
- Microsoft Entra app registration with the delegated Yammer access_as_user permission
- MSAL.PS PowerShell module
- Viva Engage verified administrator account