diff --git a/GraphRunner.ps1 b/GraphRunner.ps1 index a894c2a..8e45c42 100644 --- a/GraphRunner.ps1 +++ b/GraphRunner.ps1 @@ -4806,7 +4806,7 @@ function Invoke-InviteGuest{ # Construct the JSON payload $invitationData = @{ - invitedUserEmailAddress = $EmailAddress + invitedUserEmailAddress = [System.Web.HttpUtility]::UrlEncode($EmailAddress) invitedUserDisplayname = $Displayname inviteRedirectUrl = $RedirectUrl sendInvitationMessage = [System.Convert]::ToBoolean($SendInvitationMessage) @@ -7722,4 +7722,4 @@ Get-UserObjectID`t`t-`t Retrieves an object ID for a user Write-Host -ForegroundColor green ("=" * 80) Write-Host -ForegroundColor green '[*] For help with individual modules run Get-Help -detailed' Write-Host -ForegroundColor green '[*] Example: Get-Help Invoke-InjectOAuthApp -detailed' -} \ No newline at end of file +}