Skip to main content

Create user

Create an Entra ID user with a first password from the vault; it is asked to change it at the first sign-in unless told otherwise.

Command in the Microsoft 365 toolkit · id ooa.microsoft365/entra_create_user · 11 inputs (3 required), 1 output

Inputs​

InputTypeRequiredDefaultWhat it is
Access tokenCredentialNoMicrosoft Graph access token from the vault; or leave it empty and choose a connection that signs in, which gets and renews the token.
Display nameStringYesDisplay name.
User principal nameStringYesSign-in name in one of the tenant's domains.
PasswordCredentialYesFirst password, from the vault.
Account enabledBooleanNotrueThe account can sign in straight away.
Mail nicknameStringNoMail alias; the part of the sign-in name before @ when empty.
DepartmentStringNoDepartment.
Job titleStringNoJob title.
Force password changeBooleanNotrueAsk for a new password at the first sign-in.
FieldsDictionaryNoMore Graph user properties to set.
Endpoint addressStringNohttps://graph.microsoft.com/v1.0Graph endpoint; change only for national clouds or testing.

Outputs​

OutputTypeWhat it is
user_idStringThe new user's object id.