diff --git a/src/Identity.SignIns/beta/examples/New-MgBetaInvitation.md b/src/Identity.SignIns/beta/examples/New-MgBetaInvitation.md index cd218f37e92..fac44a201fe 100644 --- a/src/Identity.SignIns/beta/examples/New-MgBetaInvitation.md +++ b/src/Identity.SignIns/beta/examples/New-MgBetaInvitation.md @@ -34,3 +34,23 @@ New-MgBetaInvitation -BodyParameter $params ``` This example will reset the redemption status of a guest user +### Example 2: Send CC email for a new invited user. + +```powershell + +Import-Module Microsoft.Graph.Beta.Identity.SignIns + +$InvitedUserMessageInfo = @{ + CustomizedMessageBody = "Welcome!" + ccRecipients = @( + @{ + emailAddress = @{ + address = "user@ccaddress.com" + } + } + ) +} + +New-MgBetaInvitation -InvitedUserDisplayName "User" -InvitedUserEmailAddress "user@logonaddress.com" -InviteRedirectUrl "https://myapplications.microsoft.com" -InvitedUserMessageInfo $InvitedUserMessageInfo -SendInvitationMessage -Debug +``` +This example will send cc email to a new invited user diff --git a/src/Identity.SignIns/v1.0/examples/New-MgInvitation.md b/src/Identity.SignIns/v1.0/examples/New-MgInvitation.md index 845b923866f..3258d492b8c 100644 --- a/src/Identity.SignIns/v1.0/examples/New-MgInvitation.md +++ b/src/Identity.SignIns/v1.0/examples/New-MgInvitation.md @@ -29,3 +29,24 @@ Invite a guest user with the following: - Once the user redeems the invitation, the user will be redirected to https://myapplications.microsoft.com - The usertype will be set to Member - SendInvitationMessage is not specified so by default an invitation email will NOT be sent + +### Example 2: Send CC email for a new invited user. + +```powershell + +Import-Module Microsoft.Graph.Identity.SignIns + +$InvitedUserMessageInfo = @{ + CustomizedMessageBody = "Welcome!" + ccRecipients = @( + @{ + emailAddress = @{ + address = "user@ccaddress.com" + } + } + ) +} + +New-MgInvitation -InvitedUserDisplayName "User" -InvitedUserEmailAddress "user@logonaddress.com" -InviteRedirectUrl "https://myapplications.microsoft.com" -InvitedUserMessageInfo $InvitedUserMessageInfo -SendInvitationMessage -Debug +``` +This example will send cc email to a new invited user