Skip to content

Commit d1b730b

Browse files
authored
Merge pull request #617 from MicrosoftDocs/main
Changes from main to live
2 parents 7a05900 + fb95c2c commit d1b730b

File tree

2 files changed

+11
-13
lines changed

2 files changed

+11
-13
lines changed

microsoftgraph/docs-conceptual/app-only.md

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,26 +5,26 @@ description: "Learn how to use app-only authentication to enable non-interactive
55
author: msewaweru
66
manager: CelesteDG
77
ms.topic: conceptual
8-
ms.date: 09/08/2023
8+
ms.date: 10/28/2024
99
ms.author: eunicewaweru
1010

1111
#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.
1212
---
1313

1414
# Use app-only authentication with the Microsoft Graph PowerShell SDK
1515

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.
1717

1818
> [!IMPORTANT]
1919
> 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).
2020
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.
2222

2323
## Prerequisites
2424

2525
Before you can use app-only access with the Microsoft Graph PowerShell SDK, make sure you have the required prerequisites:
2626

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).
2828
- 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.
2929
1. Have an X.509 certificate installed in your user's trusted store on the machine where you'll run the script.
3030
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
3333

3434
### Step 1: Register an application
3535

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.
3737

3838
1. Use a text editor to create a new file named **RegisterAppOnly.ps1**. Paste the following code into the file.
3939

4040
:::code language="powershell" source="RegisterAppOnly.ps1":::
4141

4242
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.
4343

44-
45-
4644
```powershell
4745
.\RegisterAppOnly.ps1 -AppName "Graph PowerShell Script" -CertPath "PATH_TO_PUBLIC_KEY_FILE"
4846
```
@@ -77,7 +75,7 @@ We'll use this information to test authentication. Open PowerShell and run the f
7775
Connect-MgGraph -ClientID YOUR_APP_ID -TenantId YOUR_TENANT_ID -CertificateName YOUR_CERT_SUBJECT ## Or -CertificateThumbprint instead of -CertificateName
7876
```
7977

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.
8179

8280
```powershell
8381
ClientId : YOUR_APP_ID
@@ -144,7 +142,7 @@ Mark 8 Project Team 2bf1b0d0-81f6-4e80-b971-d1db69f8d651
144142
...
145143
```
146144

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.
148146

149147
## See also
150148

microsoftgraph/docs-conceptual/migration-steps.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
---
22
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."
44

55
ms.topic: conceptual
6-
ms.date: 10/31/2023
6+
ms.date: 10/28/2024
77
author: msewaweru
88
manager: CelesteDG
99
ms.author: eunicewaweru
10-
ms.reviewer: maisarissi, ianfarr
10+
ms.reviewer: stevemutungi
1111

1212
#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.
1313
---
1414

1515
# Upgrade from Azure AD PowerShell to Microsoft Graph PowerShell
1616

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.
1818

1919
Use the information in this article to plan the migration of your applications to Microsoft Graph PowerShell.
2020

0 commit comments

Comments
 (0)