Skip to content

Commit ed9e057

Browse files
committed
Maintenance updates.
1 parent 517923b commit ed9e057

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

articles/active-directory/external-identities/b2b-quickstart-invite-powershell.md

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,38 @@
11
---
22
title: 'Quickstart: Add a guest user with PowerShell'
3-
description: In this quickstart, you learn how to use PowerShell to send an invitation to an external Microsoft Entra B2B collaboration user. You'll use the Microsoft Graph Identity Sign-ins and the Microsoft Graph Users PowerShell modules.
3+
description: In this quickstart, you learn how to use PowerShell to send an invitation to a Microsoft Entra B2B collaboration user. You'll use the Microsoft Graph Identity Sign-ins and the Microsoft Graph Users PowerShell modules.
44
services: active-directory
55
ms.author: cmulligan
66
author: csmulligan
77
manager: CelesteDG
8-
ms.date: 07/31/2023
8+
ms.date: 09/22/2023
99
ms.topic: quickstart
1010
ms.service: active-directory
1111
ms.subservice: B2B
1212
ms.custom: it-pro, seo-update-azuread-jan, mode-api
1313
ms.collection: engagement-fy23, M365-identity-device-management
14-
#Customer intent: As a tenant admin, I want to walk through the B2B invitation workflow so that I can understand how to add a user through PowerShell.
14+
15+
#Customer intent: As a tenant admin, I want to walk through the B2B invitation workflow so that I can understand how to add a user via PowerShell.
1516
---
1617

1718
# Quickstart: Add a guest user with PowerShell
1819

19-
There are many ways you can invite external partners to your apps and services with Microsoft Entra B2B collaboration. In the previous quickstart, you saw how to add guest users directly in the Azure portal. You can also use PowerShell to add guest users, either one at a time or in bulk. In this quickstart, you’ll use the New-MgInvitation command to add one guest user to your Azure tenant.
20+
There are many ways you can invite external partners to your apps and services with Microsoft Entra B2B collaboration. In the previous quickstart, you saw how to add guest users directly in the Microsoft Entra admin center. You can also use PowerShell to add guest users, either one at a time or in bulk. In this quickstart, you’ll use the New-MgInvitation command to add one guest user to your Microsoft Entra tenant.
2021

2122
If you don’t have an Azure subscription, create a [free account](https://azure.microsoft.com/free/?WT.mc_id=A261C142F) before you begin.
2223

2324
## Prerequisites
2425

25-
### PowerShell Module
26-
Install the [Microsoft Graph Identity Sign-ins module](/powershell/module/microsoft.graph.identity.signins/?view=graph-powershell-beta&preserve-view=true) (Microsoft.Graph.Identity.SignIns) and the [Microsoft Graph Users module](/powershell/module/microsoft.graph.users/?view=graph-powershell-beta&preserve-view=true) (Microsoft.Graph.Users). You can use the `#Requires` statement to prevent running a script unless the required PowerShell modules are met.
26+
To complete the scenario in this quickstart, you need:
27+
28+
- A role that allows you to create users in your tenant directory, such as at least a [Guest Inviter role](https://learn.microsoft.com/en-us/azure/active-directory/roles/permissions-reference#guest-inviter).
29+
- Install the [Microsoft Graph Identity Sign-ins module](/powershell/module/microsoft.graph.identity.signins/?view=graph-powershell-beta&preserve-view=true) (Microsoft.Graph.Identity.SignIns) and the [Microsoft Graph Users module](/powershell/module/microsoft.graph.users/?view=graph-powershell-beta&preserve-view=true) (Microsoft.Graph.Users). You can use the `#Requires` statement to prevent running a script unless the required PowerShell modules are met.
2730

2831
```powershell
2932
#Requires -Modules Microsoft.Graph.Identity.SignIns, Microsoft.Graph.Users
3033
```
3134

32-
### Get a test email account
33-
34-
You need a test email account that you can send the invitation to. The account must be from outside your organization. You can use any type of account, including a social account such as a gmail.com or outlook.com address.
35+
- Get a test email account. You need a test email account that you can send the invitation to. The account must be from outside your organization. You can use any type of account, including a social account such as a gmail.com or outlook.com address.
3536

3637
## Sign in to your tenant
3738

@@ -56,7 +57,7 @@ When prompted, enter your credentials.
5657

5758
## Verify the user exists in the directory
5859

59-
1. To verify that the invited user was added to Microsoft Entra ID, run the following command (replace **john\@contoso.com** with your invited email):
60+
1. To verify that the invited user was added to Microsoft Entra ID, run the following command (replace **[email protected]** with your invited email):
6061

6162
```powershell
6263
Get-MgUser -Filter "Mail eq '[email protected]'"
@@ -83,4 +84,4 @@ Remove-MgUser -UserId '3f80a75e-750b-49aa-a6b0-d9bf6df7b4c6'
8384

8485

8586
## Next steps
86-
In this quickstart, you invited and added a single guest user to your directory using PowerShell. You can also invite a guest user using the [Azure portal](b2b-quickstart-add-guest-users-portal.md). Additionally you can [invite guest users in bulk using PowerShell](tutorial-bulk-invite.md).
87+
In this quickstart, you invited and added a single guest user to your directory using PowerShell. You can also invite a guest user using the [Microsoft Entra admin center](b2b-quickstart-add-guest-users-portal.md). Additionally you can [invite guest users in bulk using PowerShell](tutorial-bulk-invite.md).

0 commit comments

Comments
 (0)