You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: microsoftgraph/docs-conceptual/app-only.md
+7-9Lines changed: 7 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,26 +5,26 @@ description: "Learn how to use app-only authentication to enable non-interactive
5
5
author: msewaweru
6
6
manager: CelesteDG
7
7
ms.topic: conceptual
8
-
ms.date: 09/08/2023
8
+
ms.date: 10/28/2024
9
9
ms.author: eunicewaweru
10
10
11
11
#customer intent: As a developer, I want to authenticate with Microsoft Graph using app-only access, so that I can perform non-interactive operations, such as listing users and groups, using the Microsoft Graph PowerShell SDK.
12
12
---
13
13
14
14
# Use app-only authentication with the Microsoft Graph PowerShell SDK
15
15
16
-
The PowerShell SDK supports two types of authentication: [delegated access](/graph/auth-v2-user), and [app-only access](/graph/auth-v2-service). This guide will focus on the configuration needed to enable app-only access.
16
+
The Microsoft Graph PowerShell SDK supports two types of authentication: [delegated access](/graph/auth-v2-user), and [app-only access](/graph/auth-v2-service). This guide will focus on the configuration needed to enable app-only access.
17
17
18
18
> [!IMPORTANT]
19
19
> App-only access grants permissions directly to an application, and requires an administrator to consent to the required permission scopes. For more information on app-only access, see [Microsoft identity platform and the OAuth 2.0 client credentials flow](/azure/active-directory/develop/v2-oauth2-client-creds-grant-flow).
20
20
21
-
Let's configure app-only access for a simple script to list users and groups in your Microsoft 365 tenant.
21
+
Let's configure app-only access for a simple script to list users and groups in your Microsoft Entra tenant.
22
22
23
23
## Prerequisites
24
24
25
25
Before you can use app-only access with the Microsoft Graph PowerShell SDK, make sure you have the required prerequisites:
26
26
27
-
- Microsoft Graph PowerShell SDK is installed. Follow the [Install the Microsoft Graph PowerShell SDK](installation.md) guide to install the SDK.
27
+
-The Microsoft Graph PowerShell SDK is installed. To install the SDK, follow the [installation guide](installation.md).
28
28
- A certificate to use as a credential for the application. This certificate can be a self-signed certificate or a certificate from an authority. Refer to the [See also](#see-also) section for guidance on how to create a self-signed certificate.
29
29
1. Have an X.509 certificate installed in your user's trusted store on the machine where you'll run the script.
30
30
1. Export the certificate's public key in .cer, .pem, or .crt format.
@@ -33,16 +33,14 @@ Before you can use app-only access with the Microsoft Graph PowerShell SDK, make
33
33
34
34
### Step 1: Register an application
35
35
36
-
You can register an application using the PowerShell SDK with delegated access by signing in as an administrator, and creating the app registration.
36
+
You can register an application using the Microsoft Graph PowerShell SDK with delegated access by signing in as an administrator, and creating the app registration. Follow these steps to register an application using the Microsoft Graph PowerShell SDK.
37
37
38
38
1. Use a text editor to create a new file named **RegisterAppOnly.ps1**. Paste the following code into the file.
1. Save the file. Open PowerShell in the directory that contains **RegisterAppOnly.ps1** and run the following command. If you don't already have a certificate, you can create a self-signed certificate using the [See also](#see-also) section.
@@ -77,7 +75,7 @@ We'll use this information to test authentication. Open PowerShell and run the f
77
75
Connect-MgGraph -ClientID YOUR_APP_ID -TenantId YOUR_TENANT_ID -CertificateName YOUR_CERT_SUBJECT ## Or -CertificateThumbprint instead of -CertificateName
78
76
```
79
77
80
-
If the command succeeds, you'll see `Welcome To Microsoft Graph!`. Run `Get-MgContext` to verify that you've authenticated with app-only. The output should look like the following.
78
+
If the command succeeds, you see `Welcome To Microsoft Graph!`. Run `Get-MgContext` to verify that you authenticated with app-only. The output should look like the following.
81
79
82
80
```powershell
83
81
ClientId : YOUR_APP_ID
@@ -144,7 +142,7 @@ Mark 8 Project Team 2bf1b0d0-81f6-4e80-b971-d1db69f8d651
144
142
...
145
143
```
146
144
147
-
We've used app-only access to authenticate with Microsoft Graph and list users and groups in our tenant. You can use this same pattern to create scripts that perform any operation supported by the Microsoft Graph PowerShell SDK for non-interactive scenarios.
145
+
We used app-only access to authenticate with Microsoft Graph and list users and groups in our tenant. You can use this same pattern to create scripts that perform any operation supported by the Microsoft Graph PowerShell SDK for non-interactive scenarios.
Copy file name to clipboardExpand all lines: microsoftgraph/docs-conceptual/migration-steps.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,20 +1,20 @@
1
1
---
2
2
title: "Migrate from Azure AD PowerShell to Microsoft Graph PowerShell."
3
-
description: "Migrate your applications from Azure AD PowerShell to Microsoft Graph PowerShell."
3
+
description: "Learn how to migrate your applications from Azure AD PowerShell to Microsoft Graph PowerShell."
4
4
5
5
ms.topic: conceptual
6
-
ms.date: 10/31/2023
6
+
ms.date: 10/28/2024
7
7
author: msewaweru
8
8
manager: CelesteDG
9
9
ms.author: eunicewaweru
10
-
ms.reviewer: maisarissi, ianfarr
10
+
ms.reviewer: stevemutungi
11
11
12
12
#customer intent: As an IT admin currently using Azure AD PowerShell or MSOnline, I want to upgrade to Microsoft Graph PowerShell, so that I can access all Microsoft Graph APIs, use PowerShell 7, have cross-platform support, and take advantage of modern authentication and advanced queries.
13
13
---
14
14
15
15
# Upgrade from Azure AD PowerShell to Microsoft Graph PowerShell
16
16
17
-
Azure AD, Azure AD Preview and MSOnline PowerShell modules are planned for deprecation. Microsoft Graph PowerShell is the PowerShell module to use for interacting with Microsoft Entra ID and other Microsoft services.
17
+
Azure AD, Azure AD Preview and MSOnline PowerShell modules are deprecated. Microsoft Graph PowerShell is the PowerShell module to use for interacting with Microsoft Entra ID and other Microsoft services.
18
18
19
19
Use the information in this article to plan the migration of your applications to Microsoft Graph PowerShell.
0 commit comments