In this Azure PowerShell article, we will discuss the syntax and usage of the New-AzureADMSInvitation PowerShell command, along with examples of how to use it.
Table of Contents
New-AzureADMSInvitation
This excellent Azure PowerShell command can help invite an external user to your Azure Active Directory.
Syntax
Below is the syntax of the New-AzureADMSInvitation PowerShell command.
New-AzureADMSInvitation
-InvitedUserEmailAddress <String>
[-SendInvitationMessage <Boolean>]
-InviteRedirectUrl <String>Let’s discuss a few examples of how to use the New-AzureADMSInvitation PowerShell command.
Example
You can execute the below Azure PowerShell command to invite the user xyz@tsm.com to your Azure AD.
Connect-AzureAD -TenantId 5d9d690a-0310-474d-ae8b-42df2d549228
New-AzureADMSInvitation -InvitedUserEmailAddress xyz@tsm.com -SendInvitationMessage $True -InviteRedirectUrl "http://myapps.microsoft.com"After executing the above PowerShell command, I got the following output.
PS C:\WINDOWS\system32> Connect-AzureAD -TenantId 5d9d690a-0310-474d-ae8b-42df2d549228
New-AzureADMSInvitation -InvitedUserEmailAddress xyz@tsm.com -SendInvitationMessage $True -InviteRedirectUrl "http://myapps.microsoft.com"
Account Environment TenantId TenantDomain AccountType
------- ----------- -------- ------------ -----------
fewlines4biju@hotmail.com AzureCloud 5d9d690a-0310-474d-ae8b-42df2d549228 fewlines4bijuhotmail.onmicrosoft.com User
Id : 2344a65a-8c9a-4dfe-9dd8-8a513dc4ad56
InvitedUserDisplayName :
InvitedUserEmailAddress : xyz@tsm.com
SendInvitationMessage : True
InviteRedeemUrl : https://login.microsoftonline.com/redeem?rd=https%3a%2f%2finvitations.microsoft.com%2fredeem%2f%3ftenant%3d5d9d690a-0310-474d-ae8b
-42df2d549228%26user%3d2344a65a-8c9a-4dfe-9dd8-8a513dc4ad56%26ticket%3dxuSRxqfrejMGY3uARsyjvK2BHI23OnA2ntBiVbhhp9k%25253d%26ver%3d
2.0
InviteRedirectUrl : http://myapps.microsoft.com/
InvitedUser : class User {
Id: dad56ad9-fc4d-4586-8ce6-5c7e99602d0a
OdataType:
}
InvitedUserMessageInfo : class InvitedUserMessageInfo {
CcRecipients: System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.Recipient]
CustomizedMessageBody:
MessageLanguage:
}
InvitedUserType : Guest
Status : PendingAcceptance
ResetRedemption : FalseYou can see the same output below

Then I logged in to the Azure Portal and could see the guest user, and I was able to see a successful entry for the same.

Final Thoughts
In this Azure article, we discuss the syntax and usage of the New-AzureADMSInvitation PowerShell command, providing examples of how to use it.
You may also like the following articles below.

I am Rajkishore, and I am a Microsoft Certified IT Consultant. I have over 14 years of experience in Microsoft Azure and AWS, with good experience in Azure Functions, Storage, Virtual Machines, Logic Apps, PowerShell Commands, CLI Commands, Machine Learning, AI, Azure Cognitive Services, DevOps, etc. Not only that, I do have good real-time experience in designing and developing cloud-native data integrations on Azure or AWS, etc. I hope you will learn from these practical Azure tutorials. Read more.
