I'm trying to use the Azure AD PowerShell to generate an invite link. I'm using the New-AzureADMSInvitation method (https://learn.microsoft.com/en-us/powershell/module/azuread/new-azureadmsinvitation?view=azureadps-2.0).
I run it in the cloud shell and get the following error:
PS Azure:\> New-AzureADMSInvitation
cmdlet New-AzureADMSInvitation at command pipeline position 1
Supply values for the following parameters:
InvitedUserEmailAddress: "**@**.com"
InviteRedirectUrl: "**.com"
New-AzureADMSInvitation : Object reference not set to an instance of an object.
At line:1 char:1
+ New-AzureADMSInvitation
+ ~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [New-AzureADMSInvitation], NullReferenceException
+ FullyQualifiedErrorId : System.NullReferenceException,Microsoft.Open.MSGraphV10.PowerShell.NewAzureADMSInvitation
I've tried restarting the shell, not including the quotes in the inputs, but no luck. Anyone able to get around this?