Skip to content

Commit 8e92fde

Browse files
Merge pull request #252569 from csmulligan/csmulligan-b2b-qs
[B2B] Maintenance updates for b2b-quickstart-invite-powershell
2 parents 9407f2f + 754f89a commit 8e92fde

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,38 +1,39 @@
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
2626

27-
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.
27+
To complete the scenario in this quickstart, you need:
28+
29+
- A role that allows you to create users in your tenant directory, such as at least a [Guest Inviter role](../roles/permissions-reference.md#guest-inviter) or a [User administrator](../roles/permissions-reference.md#user-administrator).
30+
- 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.
2831

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

33-
### Get a test email account
34-
35-
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.
36+
- 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.
3637

3738
## Sign in to your tenant
3839

@@ -57,7 +58,7 @@ When prompted, enter your credentials.
5758

5859
## Verify the user exists in the directory
5960

60-
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):
61+
1. To verify that the invited user was added to Microsoft Entra ID, run the following command (replace **[email protected]** with your invited email):
6162

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

8586

8687
## Next steps
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 [Azure portal](b2b-quickstart-add-guest-users-portal.md). Additionally you can [invite guest users in bulk using PowerShell](tutorial-bulk-invite.md).
88+
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)