When dealing with user sync issues sometimes you encounter with a user that has a directory sync error evident in the MSOLUser properties.
How do you extract actual error details to understand what you may need to do to fix it?
You can run this cmdlets:
$user = "username@domain.com"
Get-MsolUser -UserPrincipalName $user | Select-Object DisplayName,UserPrincipalName,ObjectId,@{Name="Error";Expression={($_.errors[0].ErrorDetail.objecterrors.errorrecord.ErrorDescription)}} | FL
If there are any errors with the user, you will likely get information about it this way.
0 comments:
I welcome you to write your comments here..