Cannot create New Entra ID User using Powershell

PHYO AUNG KYAW 0 Reputation points

I am using PowerShell to connect to Microsoft Graph to create new users in Entra ID. I changed Graph version to too many versions but still got these errors. What is wrong with Microsoft? I am using Global Administrator account.
User's image

A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,237 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
20,189 questions
{count} votes

1 answer

Sort by: Most helpful
  1. akinbade abiola 6,030 Reputation points


    Thanks for your question.

    THE Get-MgUser cmdlet expects and object after.

    The correct syntax for Get-MgUser is

    Get-MgUser -UserId '<id>' |

    see examples here:

    This is same for New-MgUser:

    See usage here:

    Please let me know if you have further questions**

    You can mark it 'Accept Answer' if this helped.

    0 comments No comments