Friday, July 8, 2016

Security Groups Members not update Office 365

Today, i came some issue when i was migrating shared mailboxes, for every shared mailbox one security group associated. During the migration i found there are group members are not up to date in Office 365 group compare to on premises.

First thought in my mind problem with DirSync, i checked the and verify everything is fine with DirSync, then moved to check the AD for checking the group member with Get-DistributionGroupMember and find everything good, after that i checked on online Azure AD using Get-MsolGroupMember then i found group is not getting properly updated.

On premise Group details

Online Group Details

First connect to the Office 365 with below cmdlet

$cred = Get-Credential
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri -Credential $cred -Authentication Basic -AllowRedirection
Import-PSSession $Session

Now Solution is remove the Group from online and wait for next Sync

We have to use following PowerShell command to perform those steps:

Get-MSOLGroup -SearchString "groupname" - it returns ObjectID and you use objectID to issue

Remove-MSOLGroup -ObjectID 

If you want you can pipe them together

Get-MSOLGroup -SearchString "GroupName" | Remove-MSOLGroup

After next DirSync when i checked the Group member, it was up to date.

Hope this will help you.

Thank You!

No comments:

Post a Comment