MsOnline PowerShell Module retirement - replacement for Get-MsolUser Errors cmd

mark terry 185 Reputation points
2025-03-07T19:03:03.8333333+00:00

Hi all,

We have used the MSonline PowerShell module in the past (specifically the Get-MsolUser command) to gather errors for cloud based users. The example command we have used is below:

***(Get-MsolUser -UserPrincipalName ***@test.com).Errors.ErrorDetail.ObjectErrors.ErrorRecord.ErrorDescription | fl

MSFT are discontinuing support for the MSOnline PowerShell module. Does anyone know of a way to get this error information other than by using MSOnline PowerShell?

Thanks!

Microsoft Security Microsoft Entra Microsoft Entra ID
0 comments No comments
{count} votes

Accepted answer
  1. Vasil Michev 119.5K Reputation points MVP Volunteer Moderator
    2025-03-08T16:30:57.1166667+00:00

    There are several replacements, depending on the type of error. For "provisioning" errors, you can use the serviceProvisioningErrors property on the user resource:

    GET https://graph.microsoft.com/beta/users?$select=id,userPrincipalName,serviceProvisioningErrors
    

    The other property you might be interested in is onPremisesProvisioningErrors. Sadly, no filtering seems to be supported on any of these currently, so we don't have the equivalent of:

    Get-MsolUser -HasErrorsOnly
    

    If you are interested in more details, I published an article on this back in the day: https://www.michev.info/blog/post/5602/reporting-on-user-provisioning-errors-via-the-graph-api


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.