Skip to content

Updated examples for New-MgInvitaiton and New-MgBetaInvitation #3095

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions src/Identity.SignIns/beta/examples/New-MgBetaInvitation.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
21 changes: 21 additions & 0 deletions src/Identity.SignIns/v1.0/examples/New-MgInvitation.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Loading