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: exchange/docs-conceptual/app-only-auth-powershell-v2.md
+9-5Lines changed: 9 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ title: App-only authentication in Exchange Online PowerShell and Security & Comp
3
3
ms.author: chrisda
4
4
author: chrisda
5
5
manager: orspodek
6
-
ms.date: 10/24/2025
6
+
ms.date: 11/25/2025
7
7
ms.audience: Admin
8
8
audience: Admin
9
9
ms.topic: article
@@ -37,7 +37,7 @@ Certificate based authentication (CBA) or app-only authentication as described i
37
37
>
38
38
> - REST API connections in the Exchange Online PowerShell V3 module require the PowerShellGet and PackageManagement modules. For more information, see [PowerShellGet for REST-based connections in Windows](exchange-online-powershell-v2.md#powershellget-for-rest-api-connections-in-windows).
39
39
>
40
-
> If the procedures in this article don't work for you, verify that you don't have preview versions of the PackageManagement or PowerShellGet modules installed by running the following command: `Get-InstalledModule PackageManagement -AllVersions; Get-InstalledModule PowerShellGet -AllVersions`.
40
+
> -If the procedures in this article don't work for you, verify you don't have preview versions of the PackageManagement or PowerShellGet modules installed by running the following command: `Get-InstalledModule PackageManagement -AllVersions; Get-InstalledModule PowerShellGet -AllVersions`.
41
41
>
42
42
> - In Exchange Online PowerShell, you can't use the procedures in this article with the following Microsoft 365 Group cmdlets:
@@ -47,11 +47,14 @@ Certificate based authentication (CBA) or app-only authentication as described i
47
47
>
48
48
> You can use Microsoft Graph to replace most of the functionality from those cmdlets. For more information, see [Working with groups in Microsoft Graph](/graph/api/resources/groups-overview).
49
49
>
50
-
> - In Security & Compliance PowerShell, you can't use the procedures in this article with the following Microsoft Purview cmdlets:
50
+
> - In Security & Compliance PowerShell, you can't use the procedures in this article with Microsoft Purview cmdlets, including but not limited to:
> - Delegated scenarios are supported in Exchange Online. The recommended method for connecting with delegation is using GDAP and App Consent. For more information, see [Use the Exchange Online PowerShell v3 Module with GDAP and App Consent](/powershell/partnercenter/exchange-online-gdap-app). You can also use multitenant applications when CSP relationships aren't created with the customer. The required steps for using multitenant applications are called out within the regular instructions in this article.
57
60
>
@@ -201,7 +204,7 @@ For a detailed visual flow about creating applications in Microsoft Entra ID, se
201
204
202
205
When you're finished on the **App registrations** page, select **Register**.
203
206
204
-
5. You're taken to the **Overview** page of the app you just registered. Leave this page open. You use it in the next step.
207
+
5. You're taken to the **Overview** page of the app you registered. Leave this page open. You use it in the next step.
205
208
206
209
### Step 2: Assign API permissions to the application
207
210
@@ -433,7 +436,7 @@ The supported Microsoft Entra roles are described in the following table:
433
436
434
437
The Security Administrator role doesn't have the necessary permissions for those same tasks.
435
438
436
-
² Microsoft recommends that you use roles with the fewest permissions. Using lower permissioned accounts helps improve security for your organization. Global Administrator is a highly privileged role that should be limited to emergency scenarios when you can't use an existing role.
439
+
² Microsoft strongly advocates for the principle of least privilege. Assigning accounts only the minimum permissions necessary to perform their tasks helps reduce security risks and strengthens your organization's overall protection. Global Administrator is a highly privileged role that you should limit to emergency scenarios or when you can't use a different role.
437
440
438
441
For general instructions about assigning roles in Microsoft Entra ID, see [Assign Microsoft Entra roles to users](/entra/identity/role-based-access-control/manage-roles-portal).
439
442
@@ -457,6 +460,7 @@ For general instructions about assigning roles in Microsoft Entra ID, see [Assig
457
460

458
461
459
462
3. On the **Assignments** page that opens, select **Add assignments**.
463
+
460
464
-**Exchange Online PowerShell**:
461
465
462
466

This cmdlet is available only in Security & Compliance PowerShell. For more information, see [Security & Compliance PowerShell](https://learn.microsoft.com/powershell/exchange/scc-powershell).
17
+
18
+
Use the Cancel-SensitiveInformationScan cmdlet to cancel sensitive information scans.
19
+
20
+
For information about the parameter sets in the Syntax section below, see [Exchange cmdlet syntax](https://learn.microsoft.com/powershell/exchange/exchange-cmdlet-syntax).
To use this cmdlet in Security & Compliance PowerShell, you need to be assigned permissions. For more information, see [Permissions in the Microsoft Purview compliance portal](https://learn.microsoft.com/purview/microsoft-365-compliance-center-permissions).
This example cancels the specified sensitive information scan.
43
+
44
+
## PARAMETERS
45
+
46
+
### -Identity
47
+
48
+
> Applicable: Security & Compliance
49
+
50
+
The Identity parameter specifies the sensitive information scan that you want to cancel. You can use any value that uniquely identifies the scan. For example:
The Confirm switch specifies whether to show or hide the confirmation prompt. How this switch affects the cmdlet depends on if the cmdlet requires confirmation before proceeding.
73
+
74
+
- Destructive cmdlets (for example, Remove-\* cmdlets) have a built-in pause that forces you to acknowledge the command before proceeding. For these cmdlets, you can skip the confirmation prompt by using this exact syntax: `-Confirm:$false`.
75
+
- Most other cmdlets (for example, New-\* and Set-\* cmdlets) don't have a built-in pause. For these cmdlets, specifying the Confirm switch without a value introduces a pause that forces you acknowledge the command before proceeding.
76
+
77
+
```yaml
78
+
Type: SwitchParameter
79
+
Parameter Sets: (All)
80
+
Aliases: cf
81
+
82
+
Required: False
83
+
Position: Named
84
+
Default value: None
85
+
Accept pipeline input: False
86
+
Accept wildcard characters: False
87
+
```
88
+
89
+
### -WhatIf
90
+
91
+
> Applicable: Security & Compliance
92
+
93
+
The WhatIf switch doesn't work in Security & Compliance PowerShell.
94
+
95
+
```yaml
96
+
Type: SwitchParameter
97
+
Parameter Sets: (All)
98
+
Aliases: wi
99
+
100
+
Required: False
101
+
Position: Named
102
+
Default value: None
103
+
Accept pipeline input: False
104
+
Accept wildcard characters: False
105
+
```
106
+
107
+
### CommonParameters
108
+
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/p/?LinkID=113216).
This cmdlet is available only in Security & Compliance PowerShell. For more information, see [Security & Compliance PowerShell](https://learn.microsoft.com/powershell/exchange/scc-powershell).
17
+
18
+
Use the Get-SensitiveInformationScan cmdlet to view the properties of sensitive information scans.
19
+
20
+
For information about the parameter sets in the Syntax section below, see [Exchange cmdlet syntax](https://learn.microsoft.com/powershell/exchange/exchange-cmdlet-syntax).
To use this cmdlet in Security & Compliance PowerShell, you need to be assigned permissions. For more information, see [Permissions in the Microsoft Purview compliance portal](https://learn.microsoft.com/purview/microsoft-365-compliance-center-permissions).
This example returns a summary list of all sensitive information scans in the organization.
43
+
44
+
### Example 2
45
+
```powershell
46
+
Get-SensitiveInformationScan -Identity "HR Department Scan"
47
+
```
48
+
49
+
This example returns detailed information for the specified scan.
50
+
51
+
## PARAMETERS
52
+
53
+
### -Identity
54
+
55
+
> Applicable: Security & Compliance
56
+
57
+
The Identity parameter specifies the sensitive information scan that you want to view. You can use any value that uniquely identifies the scan. For example:
The IncludeImpactAssessment parameter specifies whether to refresh the latest scan status during the estimation stage. Valid values are:
80
+
81
+
- $true: Get the latest estimation status.
82
+
- $false: Return the last updated scan status.
83
+
84
+
```yaml
85
+
Type: Boolean
86
+
Parameter Sets: (All)
87
+
Aliases:
88
+
89
+
Required: False
90
+
Position: Named
91
+
Default value: None
92
+
Accept pipeline input: False
93
+
Accept wildcard characters: False
94
+
```
95
+
96
+
### -IncludeProgressForAllActiveScans
97
+
98
+
> Applicable: Security & Compliance
99
+
100
+
This parameter is reserved for internal Microsoft use.
101
+
102
+
```yaml
103
+
Type: Boolean
104
+
Parameter Sets: (All)
105
+
Aliases:
106
+
107
+
Required: False
108
+
Position: Named
109
+
Default value: None
110
+
Accept pipeline input: False
111
+
Accept wildcard characters: False
112
+
```
113
+
114
+
### -IncludeScanProgress
115
+
116
+
> Applicable: Security & Compliance
117
+
118
+
The IncludeScanProgress parameter specifies whether to refresh the latest scan status during the classification phase. Valid values are:
119
+
120
+
- $true: Get the latest classification status.
121
+
- $false: Return the last updated scan status.
122
+
123
+
```yaml
124
+
Type: Boolean
125
+
Parameter Sets: (All)
126
+
Aliases:
127
+
128
+
Required: False
129
+
Position: Named
130
+
Default value: None
131
+
Accept pipeline input: False
132
+
Accept wildcard characters: False
133
+
```
134
+
135
+
### CommonParameters
136
+
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/p/?LinkID=113216).
0 commit comments