This cmdlet is used to invite a new external user to your directory.
Examples
Invite a new external user to your directory
New-AzureADMSInvitation -InvitedUserEmailAddress someexternaluser@externaldomain.com -SendInvitationMessage $True -InviteRedirectUrl "http://myapps.microsoft.com"
Id : 6058156a-93d1-4958-a738-ddc4ab4432cf
InvitedUserDisplayName :
InvitedUserEmailAddress : someexternaluser@externaldomain.com
SendInvitationMessage : True
InviteRedeemUrl : https://login.microsoftonline.com/redeem?rd=https%3a%2f%2finvitations.microsoft.com%2fredeem%2f%3ftenant%3d06f6521d-c18c-460a-8656-fa82e81aa94b%26user%3d7b67d069-163b-4f7e-9118-c9ceeda363d9%26ticket%3ddANXuWQMNhYv21%252bFBm%252fULkTqCnpX6vNvRgTHQmsECPU%253d%26ver%3d2.0
InviteRedirectUrl : http://myapps.microsoft.com/
InvitedUser : class User {
Id: 04fd8318-77ca-428e-b7f2-2bb1ef7a0100
OdataType:
}
InvitedUserMessageInfo : class InvitedUserMessageInfo {
CcRecipients: System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.Recipient]
CustomizedMessageBody:
MessageLanguage:
}
InvitedUserType : Guest
Status : PendingAcceptance
Using the cmdlet in this example, an email is sent to the user whose email address is in the -InvitedUserEmailAddress parameter.
When the user accepts the invitation, they are forwarded to the url as specified in the -InviteRedirectUrl parameter
Parameters
-InvitedUserDisplayName
The display name of the user as it will appear in your directory.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-InvitedUserEmailAddress
The Email address to which the invitation is sent.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
True
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-InvitedUserMessageInfo
Additional information to specify how the invitation message is sent
Parameter properties
Type:
InvitedUserMessageInfo
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-InvitedUserType
The userType of the user being invited.
By default, this is Guest.
You can invite as Member if you're are company administrator.
Parameter properties
Type:
String
Default value:
Guest
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-InviteRedirectUrl
The URL to which the invited user is forwarded after accepting the invitation.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
True
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-SendInvitationMessage
A Boolean parameter that indicates whether or not an invitation message will be sent to the invited user.
Parameter properties
Type:
Boolean
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable,
-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see
about_CommonParameters.