Deleted users available to add to Yammer groups

%3CLINGO-SUB%20id%3D%22lingo-sub-84432%22%20slang%3D%22en-US%22%3EDeleted%20users%20available%20to%20add%20to%20Yammer%20groups%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-84432%22%20slang%3D%22en-US%22%3E%3CP%3EWhen%20people%20leave%20our%20company%20we%20remove%20them%20from%20Sharepoint%20and%20Yammer.%20If%20i%20export%20users%20from%20Yammer%20they%20show%20as%20%22soft_deleted%22%20and%20don't%20show%20up%20as%20user%20of%20Yammer%20anymore%2C%20EXCEPT%2C%20when%20you%20add%20members%20to%20Yammer%20Groups.%20If%20you%20type%20in%20some%20letters%20and%20it%20gives%20a%20real%20time%20list%20of%20names%20that%20match%2C%20ALL%20of%20our%20previous%20employees%20names%20show%20up%20in%20there.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIs%20that%20a%20bug%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%2C%3C%2FP%3E%3CP%3ERob.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-84432%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EYammer%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-86116%22%20slang%3D%22en-US%22%3ERe%3A%20Deleted%20users%20available%20to%20add%20to%20Yammer%20groups%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-86116%22%20slang%3D%22en-US%22%3E%3CP%3ERob%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIn%20your%20export%2C%20do%20the%20users%20that%20are%20popping%20up%20in%20suggested%20users%20have%20a%20value%20within%20the%20delete_at%20date%20field%3F%20%26nbsp%3BIf%20they%20do%2C%20then%20I%20believe%20this%20is%20a%20bug.%20%26nbsp%3B(If%20they%20don't%2C%20then%20they're%20not%20really%20deleted.)%20%26nbsp%3BYou%20should%20call%20this%20in%2C%20but%20in%20the%20meantime%20there%20are%20two%20other%20things%20you%20can%20do.%20%26nbsp%3BYou%20can%20block%20the%20accounts%20en%20masse%2C%20which%20should%26nbsp%3Bprevent%20the%20behavior.%20%26nbsp%3BAlso%2C%20you%20can%20force%20Yammer%20to%20re-acknowledge%20the%20deletion%20by%20programattically%20forcing%20a%20delete%20using%20the%20script%20below.%20%26nbsp%3BThey'll%20still%20show%20up%20in%20the%20export%2C%20but%20they%20should%20be%20genuinely%20gone.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%3EWritten%20by%20James%20Wilcox%0A%0A%23PowerShell%20Script%20to%20Set%20Accounts%20to%20soft_delete%0A%0A%24token%20%3D%20%22%26lt%3BToken%26gt%3B%22%0A%0A%20%24Headers%20%3D%20%40%7B%0A%20%22Accept%22%20%3D%20%22*%2F*%22%0A%20%22Authorization%22%20%3D%20%22Bearer%20%22%2B%24token%0A%20%22accept-encoding%22%20%3D%20%22gzip%22%0A%20%22content-type%22%3D%22application%2Fjson%22%0A%20%22content-length%22%20%3D%20%222%22%0A%20%7D%0A%0A%23import%20User%20ID's%20that%20need%20removed.%0A%20%24users%20%3D%20import-csv%20C%3A%5CYammer%5CUsersToDelete.csv%0A%20%24users%20%3D%20%24users.id%0A%0A%23loop%20through%20all%20User%20ID's%0A%20foreach%20(%24user%20in%20%24users)%7B%0A%0A%20%24uri%20%3D%20%22https%3A%2F%2Fwww.yammer.com%2Fapi%2Fv1%2Fusers%2F%24user.json%3Fdelete%3Dtrue%22%0A%0AWrite-Host%20%24uri%0A%0A(Invoke-WebRequest%20-Uri%20%24uri%20-Method%20Delete%20-Headers%20%24Headers).content%20%7C%20ConvertFrom-Json%0A%0A%20%7D%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-85489%22%20slang%3D%22en-US%22%3ERe%3A%20Deleted%20users%20available%20to%20add%20to%20Yammer%20groups%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-85489%22%20slang%3D%22en-US%22%3E%3CP%3EHey%20Rob%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EYou%20have%20to%20remove%20each%20user%20from%20Yammer%20%26nbsp%3BManually%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIf%20you're%20an%20admin%3C%2FP%3E%3CP%3EGo%20to%26nbsp%3B%3CSTRONG%3ENetwork%20Admin%20%26gt%3B%20System%20%26gt%3B%20Users%20%26gt%3B%20Remove%20Users%20%26gt%3B%26nbsp%3B%3C%2FSTRONG%3ESearch%20the%20name%20of%20User%20whom%20you%20want%20to%20remove%20and%20click%20on%20thier%20profile%20to%20remove.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20hope%20it%20will%20work%20for%20you%3C%2FP%3E%3C%2FLINGO-BODY%3E
Super Contributor

When people leave our company we remove them from Sharepoint and Yammer. If i export users from Yammer they show as "soft_deleted" and don't show up as user of Yammer anymore, EXCEPT, when you add members to Yammer Groups. If you type in some letters and it gives a real time list of names that match, ALL of our previous employees names show up in there.

 

Is that a bug?

 

Thanks,

Rob.

2 Replies

Hey Rob,

 

You have to remove each user from Yammer  Manually

 

If you're an admin

Go to Network Admin > System > Users > Remove Users > Search the name of User whom you want to remove and click on thier profile to remove.

 

I hope it will work for you

Rob,

 

In your export, do the users that are popping up in suggested users have a value within the delete_at date field?  If they do, then I believe this is a bug.  (If they don't, then they're not really deleted.)  You should call this in, but in the meantime there are two other things you can do.  You can block the accounts en masse, which should prevent the behavior.  Also, you can force Yammer to re-acknowledge the deletion by programattically forcing a delete using the script below.  They'll still show up in the export, but they should be genuinely gone.

 

Written by James Wilcox

#PowerShell Script to Set Accounts to soft_delete

$token = "<Token>"

 $Headers = @{
 "Accept" = "*/*"
 "Authorization" = "Bearer "+$token
 "accept-encoding" = "gzip"
 "content-type"="application/json"
 "content-length" = "2"
 }

#import User ID's that need removed.
 $users = import-csv C:\Yammer\UsersToDelete.csv
 $users = $users.id

#loop through all User ID's
 foreach ($user in $users){

 $uri = "https://www.yammer.com/api/v1/users/$user.json?delete=true"

Write-Host $uri

(Invoke-WebRequest -Uri $uri -Method Delete -Headers $Headers).content | ConvertFrom-Json

 }