Skip to content

Commit e8c3f40

Browse files
authored
Updated to provide Graph PS examples instead of AAD
1 parent 2a301fb commit e8c3f40

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

articles/active-directory/external-identities/reset-redemption-status.md

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -60,15 +60,18 @@ If a user wants to sign in using a different email:
6060
>
6161
### Use PowerShell to reset redemption status
6262

63-
Install the latest AzureADPreview PowerShell module and create a new invitation with `InvitedUserEmailAddress` set to the new email address, and `ResetRedemption` set to `true`.
64-
65-
```powershell
66-
Uninstall-Module AzureADPreview
67-
Install-Module AzureADPreview
68-
Connect-AzureAD
69-
$ADGraphUser = Get-AzureADUser -objectID "UPN of User to Reset"
70-
$msGraphUser = New-Object Microsoft.Open.MSGraph.Model.User -ArgumentList $ADGraphUser.ObjectId
71-
New-AzureADMSInvitation -InvitedUserEmailAddress <<external email>> -SendInvitationMessage $True -InviteRedirectUrl "http://myapps.microsoft.com" -InvitedUser $msGraphUser -ResetRedemption $True
63+
```powershell
64+
Install-Module Microsoft.Graph
65+
Select-MgProfile -Name beta
66+
Connect-MgGraph
67+
68+
$user = Get-MgUser -Filter "startsWith(mail, '[email protected]')"
69+
New-MgInvitation `
70+
-InvitedUserEmailAddress $user.Mail `
71+
-InviteRedirectUrl "http://myapps.microsoft.com" `
72+
-ResetRedemption `
73+
-SendInvitationMessage `
74+
-InvitedUser $user
7275
```
7376

7477
### Use Microsoft Graph API to reset redemption status

0 commit comments

Comments
 (0)