Sep 15 2016 09:37 AM
Sep 15 2016 09:37 AM
One feature of Yammer is that users may allow Yammer to send invitations to join Yammer to accounts in that user's address book. Which is pretty nice in general, but one of the unwanted side effects is that groups in your corporate network which have email addresses are sent invitations. (For example All_Europe_Users@contoso.com). Additionally, invited and non-confirmed accounts are in pending status, and therefore show up as suggested accounts.
We have enough work to do helping people collaborate more effectively; we don't need all this traffic to accounts that aren't even really individuals. To help make things clean, we need to get those group accounts out of there!
What you need to do is get a list of group accounts which have email, and then suspend or delete each one. When you're done that, you need to then block each one as well, or else someone will just re-invite the group account. (Note that you will only be able to do that in paid networks, and you need to be a verified administrator).
To suspend or delete, go to www.yammer.com/<YourHomeNetwork>/admin/users_bulk_update and read up how to do it. Create and open the CSV file in Excel. Keep it as a CSV file, don't save it as XLSX. There are great instructions on that Yammer page in your admin panel and you need to understand fully what you're doing before trying that out. This and Block Users functionality are documented in the Yammer Admin Guide
Anyway, the hard part is getting that list of email addresses. If you're lucky enough to have security admins to get that for you, get the list from them. But if you're not, you can almost always get the list yourself, with just your regular old permissions.
Assuming it's a Microsoft Active Directory (AD) network, which is true for almost everyone, you need to query AD. Best to use PowerShell to do that. (Don't stop reading thinking you're not technical enough. Yes you are; this is simple).
To start PowerShell in Windows 8, just go to your tile screen and type PowerShell and it should come up as Windows PowerShell. If you're on a previous version of Windows, Start - Run - PowerShell, or type PowerShell from a command prompt.
At the prompt, enter this (copy and paste) then hit Enter:
Get-ADObject -LDAPFilter "(&(objectclass=group)(mail=*))" -Properties Mail | Out-GridView
(Note: Easy way to paste in PowerShell is with the right mouse button.)
What that does is it goes through Active Directory and gets all the groups you're allowed to look at (which should be all of them). It searches for groups that have an email account associated with them (which aren't all of the groups - this helps you target only the ones that matter to you as a Yammer admin). Then it displays them in a nifty looking grid.
I gave you that first because it shows you what you're dealing with for your network. But you'll soon find that it's not helpful for you to actually do something about it. This is really just a very simple way to get a view into the data in Active Directory. My hope is that it makes what you're looking at more understandable and less scary for the less-technical folks. It's just data. :)
For the money script that will actually help you get where you're going, you'll need to figure out where you want a text file to be created. This script uses C:\Data\GroupMail.txt. You need to choose your own path, something where you can access the text file when you're done.
Close the grid from the last command.
At the PowerShell prompt, enter this then hit Enter:
Get-ADObject -LDAPFilter "(&(objectclass=group)(mail=*))" -Properties Mail | Format-List -Property Mail | Out-File C:\Data\GroupMail.txt
(Copy and paste, but when you run it, you'll have a different place for your file, so delete "C:\Data\GroupMail.txt" and enter the location and name of your file at the very end.)
Now go to where you saved that file and just double-click it. You might not see the ".txt" part of the name. Notepad should open up and you'll see a list of email addresses, double-spaced, with "Mail : " before each item. You want to get rid of that prefix, since it's not helpful. So Edit --> Replace --> Find what: "Mail : " (no quotes), Replace with: (nothing). Hit Replace All.
Now you have your email addresses double-spaced.
Get rid of the extra space between each item by either copy and pasting that list into Excel or saving the text file and opening it with Excel. Once you have the data in Excel, choose Data --> Sort --> Column A --> A to Z --> OK.
Now you should have something truly useful. You can copy and paste all your values into a CSV file with a delete (or suspend) in front of it and upload it as a bulk update. Poof, now all those accounts are gone from your network. Now finish it up and make sure nobody invites any of those accounts back into your network. Select them all as a list and copy and paste into your blocked list.
Congratulations, all the groups in your network which have email addresses have been exiled from your Yammer network, never to return. Pat the plush Yammy doll on your desk and celebrate. Of course, new group accounts are created from time to time so this is something you should decide to schedule periodically.
I hope that helps. If you don't have access to PowerShell, there are ancient commands which do the same thing (dsget, dsquery), but PowerShell is the way you want to go. It's worth getting permission from your local administrator. But if you're really stuck let me know and I'll list off how to do it the old way.
(Originally posted on the Office 365 Network 19 March, 2015.)