Sign in with Microsoft
Sign in or create an account.
Hello,
Select a different account.
You have multiple accounts
Choose the account you want to sign in with.
Export Viva Engage community members to a CSV file

Follow this procedure to export Viva Engage community members' names and email addresses to a comma-separated value (CSV) file. This is a useful method for contacting community members by email, inviting members to another Viva Engage community, or determining if anyone is missing from the community.

Any member of your Viva Engage network can export the information for public communities. For private communities, only members of the community and network admins can export this information.

The procedure may look complicated, but it takes just a few minutes to complete.

Note: Don't use this procedure if your community is Microsoft 365-connected and you have access to the Azure Active Directory (Azure AD) portal. Instead, follow the steps at Bulk download members of a group in Azure Active Directory.

  1. Find the community's group ID:

    1. In Viva Engage on the web, select a community.

    2. In the URL in the address bar, copy all of the text after groups/ and before /all. This is the base 64 encoding; for example, the base 64 encoding in the following URL is in bold:

      ttps://web.yammer.com/main/groups/eyJfdHlwZSI6Ikdyb3VwIiwiaWQiOiI5NzM0ODQ4N0TEyIn/all

    3. After copying the base 64 encoding, use an online tool to decode base 64.
      Using the base 64 encoding example from the previous step, an online decoding tool would decode it as follows:

      {"_type":"Group","id":"9734848512"}

      The group ID in this example would be 9734848512.

      Yammer community feed ID

  2. Find your token:

    Warning: Do not share your token with anyone else. It can be used to access your Viva Engage account.

    1. In a browser, go to https://www.yammer.com/client_applications.

    2. Select Register New App, and in the dialog that appears, enter the following:

    • Application Name: Whatever name you use in this space must be unique. You'll use it in the following steps to get your token.

    • O rganization: Enter your company name.

    • S upport e-mail: Enter your work email address.

    • Website: Enter your company's website.

    • Redirect URI: Enter https://www.yammer.com.

      Details page for creating a new Yammer app

    • When you're finished with this dialog, select Continue.

    1. Under Keys and token, select Generate a developer token for this application.

      Yammer app page showing link to get token

      The token is shown at the bottom of the Keys and token page. It is shown blurred in the following picture.

      Yammer app page showing token

    2. Copy the token to a Notepad file.

  3. Create and run a Windows PowerShell script:

    Warning: Do not share this script after you enter your token. Your token can be used to access your Viva Engage account.

    1. Copy the following code to a Notepad file:

      $GroupId=group_id_value
      
      $Token = "token_value"
      
      $Headers = @{ "Authorization" = "Bearer "+$Token }
      $GroupCycle = 1
      DO
           {
                $GetMoreGroupsUri = "https://www.yammer.com/api/v1/users/in_group/$GroupId.xml?page=$GroupCycle"
                write-host ("REST API CALL : $GetMoreGroupsUri")
                [xml]$Xml = ((Invoke-WebRequest -Uri $GetMoreGroupsUri -Method Get -Headers $Headers).content)
                $YammerGroups += $Xml.response.users.user
                $GroupCycle ++
                $GroupCount += $Xml.response.users.user.count
                write-host ("GROUPMEMBER COUNT : $GroupCount")
           }
           While ($Xml.response.users.user.count -gt 0)
            $YammerGroups | Where {$_} | Export-Csv "$GroupId.csv" -Delimiter ","
    2. In the first two lines of the script, replace the group_id_value and token_value with the group ID from Step 1 and the token from Step 2.

    3. Open PowerShell.
      If you don't have PowerShell installed, see Installing various versions of PowerShell for installation information.

    4. In PowerShell, change directories to the location you want the .csv file to be saved. For example, if you want the script to be stored in your Documents folder, and your username is Joe, type:

      cd c:\users\joe\documents
    5. Copy the script from your NotePad file, paste it into PowerShell, and press Enter.

  4. Open your .csv file:

    1. Double-click the .csv file, which will have the name GroupID.csv, using the group ID from Step 1.
      This file will be in the directory from which you ran the PowerShell commands.

    2. View the full-name and email columns to get the list of Viva Engage community members.

See also

Manage a community in Viva Engage

Manage Viva Engage community members

Customize a Viva Engage community

Join and create a community in Viva Engage

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.

Was this information helpful?

What affected your experience?
By pressing submit, your feedback will be used to improve Microsoft products and services. Your IT admin will be able to collect this data. Privacy Statement.

Thank you for your feedback!

×