Forum Discussion

John_Lee2025's avatar
John_Lee2025
Copper Contributor
Dec 16, 2022

Replacement cmdlets for Msol cmdlets for Mailbox Validation

Due to the looming deprecation of AzureAD and Msol cmdlets, I am trying to search for replacement Graph SDK cmdlets for the following cmdlets which is about showing the validation error of O365 mailbox.

 

 

Get-MsolUser -UserPrincipalName $wsUserPrincipalName | Select-Object ValidationStatus
(Get-MsolUser -UserPrincipalName $wsUserPrincipalName).errors[0].ErrorDetail.objecterrors.errorrecord.ErrorDescription

 

 

Above please find an image showing the output of the 2 cmdlets.
Thanks.

  • There's no proper replacement for this, afaik. In Graph, the onPremisesProvisioningErrors property covers some scenarios, but it's not an exact replacement.
  • There's no proper replacement for this, afaik. In Graph, the onPremisesProvisioningErrors property covers some scenarios, but it's not an exact replacement.
    • John_Lee2025's avatar
      John_Lee2025
      Copper Contributor

      Thanks VasilMichev 
      I got a similar response when I asked the same question via https://serviceshub.microsoft.com 

      It is disappointing because I have been relying on this cmdlet to proactively fix hybrid account provisioning errors.  I don't really want to wait till users report provisioning errors and have to individually go to check it out on O365 Admin Center.

Resources