Skip to content

Commit 45d6c90

Browse files
authored
Merge branch 'main' into docs-editor/Set-CsTeamsCallingPolicy-1772727701
2 parents bd57834 + fd58c09 commit 45d6c90

23 files changed

Lines changed: 1138 additions & 75 deletions
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: (Scheduled) Auto issue assign
2+
3+
permissions:
4+
issues: write
5+
6+
on:
7+
schedule:
8+
- cron: "0 17 * * *"
9+
10+
workflow_dispatch:
11+
12+
13+
jobs:
14+
15+
stale-branch:
16+
if: github.repository_owner == 'MicrosoftDocs'
17+
uses: MicrosoftDocs/microsoft-365-docs/.github/workflows/Shared-AutoIssueAssign.yml@workflows-prod
18+
with:
19+
PayloadJson: ${{ toJSON(github) }}
20+
ExcludedUserList: '["user1", "user2"]'
21+
22+
secrets:
23+
AccessToken: ${{ secrets.GITHUB_TOKEN }}
24+
PrivateKey: ${{ secrets.M365_APP_PRIVATE_KEY }}
25+
ClientId: ${{ secrets.M365_APP_CLIENT_ID }}

.github/workflows/AutoPublish.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
name: (Scheduled) Publish to live
23

34
permissions:
@@ -7,8 +8,8 @@ permissions:
78

89
on:
910
schedule:
10-
# - cron: "25 2,5,8,11,14,17,20,22 * * *" # Times are UTC based on Daylight Saving Time (~Mar-Nov). Scheduling at :25 to account for queuing lag.
11-
- cron: "25 3,6,9,12,15,18,21,23 * * *" # Times are UTC based on Standard Time (~Nov-Mar). Scheduling at :25 to account for queuing lag.
11+
- cron: "25 2,5,8,11,14,17,20,22 * * *" # Times are UTC based on Daylight Saving Time (~Mar-Nov). Scheduling at :25 to account for queuing lag.
12+
# - cron: "25 3,6,9,12,15,18,21,23 * * *" # Times are UTC based on Standard Time (~Nov-Mar). Scheduling at :25 to account for queuing lag.
1213

1314
workflow_dispatch:
1415

@@ -25,4 +26,4 @@ jobs:
2526
secrets:
2627
AccessToken: ${{ secrets.GITHUB_TOKEN }}
2728
PrivateKey: ${{ secrets.M365_APP_PRIVATE_KEY }}
28-
ClientId: ${{ secrets.M365_APP_CLIENT_ID }}
29+
ClientId: ${{ secrets.M365_APP_CLIENT_ID }}

exchange/docs-conceptual/app-only-auth-powershell-v2.md

Lines changed: 32 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: App-only authentication in Exchange Online PowerShell and Security & Compliance PowerShell
3-
ms.date: 02/27/2026
3+
ms.date: 03/11/2026
44
ms.audience: Admin
55
audience: Admin
66
ms.topic: article
@@ -18,7 +18,7 @@ description: "Learn how to configure app-only authentication (also known as cert
1818

1919
Auditing and reporting scenarios in Microsoft 365 often involve unattended scripts in Exchange Online PowerShell and Security & Compliance PowerShell. In the past, unattended sign in required you to store the username and password in a local file or in a secret vault accessed at run-time. But, as we all know, storing user credentials locally isn't a good security practice.
2020

21-
Certificate based authentication (CBA) or app-only authentication as described in this article supports unattended script and automation scenarios by using Microsoft Entra apps and self-signed certificates.
21+
Certificate based authentication (CBA) or app-only authentication as described in this article supports unattended script and automation scenarios by using Microsoft Entra apps and certificates.
2222

2323
> [!NOTE]
2424
>
@@ -151,16 +151,16 @@ For a detailed visual flow about creating applications in Microsoft Entra ID, se
151151
152152
An application object has the **Delegated** API permission **Microsoft Graph** \> **User.Read** by default. For the application object to access resources in Exchange, it needs the **Application** API permission **Office 365 Exchange Online** \> **Exchange.ManageAsApp**.
153153
154-
3. [Generate a self-signed certificate](#step-3-generate-a-self-signed-certificate)
154+
3. [Generate a certificate](#step-3-generate-a-certificate)
155155
156156
- For app-only authentication in Microsoft Entra ID, you typically use a certificate to request access. Anyone who has the certificate and its private key can use the app with the permissions granted to the app.
157157
158-
- Create and configure a self-signed X.509 certificate, which is used to authenticate your Application against Microsoft Entra ID, while requesting the app-only access token.
158+
- Create and configure an X.509 certificate, which is used to authenticate your Application against Microsoft Entra ID, while requesting the app-only access token. The certificate can be self-signed.
159159
160-
- This procedure is similar to generating a password for user accounts. The certificate can be self-signed as well. See [this section](#step-3-generate-a-self-signed-certificate) later in this article for instructions to generate certificates in PowerShell.
160+
- This procedure is similar to generating a password for user accounts. See [this section](#step-3-generate-a-certificate) later in this article for instructions to generate certificates in PowerShell.
161161
162162
> [!NOTE]
163-
> Cryptography: Next Generation (CNG) certificates aren't supported for app-only authentication with Exchange. CNG certificates are created by default in modern versions of Windows. You must use a certificate from a CSP key provider. [This section](#step-3-generate-a-self-signed-certificate) section covers two supported methods to create a CSP certificate.
163+
> Cryptography: Next Generation (CNG) certificates aren't supported for app-only authentication with Exchange. CNG certificates are created by default in modern versions of Windows. You must use a certificate from a CSP key provider. [This section](#step-3-generate-a-certificate) section covers two supported methods to create a CSP certificate.
164164
165165
4. [Attach the certificate to the Microsoft Entra application](#step-4-attach-the-certificate-to-the-microsoft-entra-application)
166166
@@ -334,27 +334,36 @@ Choose **one** of the following methods in this section to assign API permission
334334
335335
6. Close the current **API permissions** page (not the browser tab) to return to the **App registrations** page. You use the **App registrations** page in an upcoming step.
336336
337-
### Step 3: Generate a self-signed certificate
337+
<a name="step-3-generate-a-self-signed-certificate"></a>
338338
339-
Create a self-signed x.509 certificate using one of the following methods:
339+
### Step 3: Generate a certificate
340340
341-
- (Recommended) Use the [New-SelfSignedCertificate](/powershell/module/pki/new-selfsignedcertificate), [Export-Certificate](/powershell/module/pki/export-certificate), and [Export-PfxCertificate](/powershell/module/pki/export-pfxcertificate) cmdlets in an elevated (run as administrator) Windows PowerShell session to request a self-signed certificate and export it to `.cer` and `.pfx` (SHA1 by default). For example:
341+
> [!NOTE]
342+
> Cryptography: Next Generation (CNG) certificates aren't supported for app-only authentication as described in this article. CNG certificates are created by default in modern Windows versions. You need to use a certificate from a CSP key provider.
343+
>
344+
> You can use a self-signed certificate, a certificate issued by an internal public key infrastructure or PKI (for example, Active Directory Certificate Services or AD CS), or a certificate issued by a trusted commercial certificate authority (CA).
345+
>
346+
> The only requirements for the X.509 certificate are an exportable and available private key (.pfx) and public certificate (.cer).
342347
343-
```powershell
344-
# Create certificate
345-
$mycert = New-SelfSignedCertificate -DnsName "contoso.org" -CertStoreLocation "cert:\CurrentUser\My" -NotAfter (Get-Date).AddYears(1) -KeySpec KeyExchange
348+
For a **self-signed certificate**, use one of the following methods:
346349
347-
# Export certificate to .pfx file
348-
$mycert | Export-PfxCertificate -FilePath mycert.pfx -Password (Get-Credential).password
350+
- (Recommended): Use the [New-SelfSignedCertificate](/powershell/module/pki/new-selfsignedcertificate), [Export-Certificate](/powershell/module/pki/export-certificate) and [Export-PfxCertificate](/powershell/module/pki/export-pfxcertificate) cmdlets in an elevated PowerShell session (a PowerShell window you opened after selecting **Run as administrator**) to request a self-signed certificate and export the certificate's private and public keys to files (SHA1 by default). For example:
349351
350-
# Export certificate to .cer file
351-
$mycert | Export-Certificate -FilePath mycert.cer
352-
```
352+
```powershell
353+
# Create a self-signed certificate
354+
$mycert = New-SelfSignedCertificate -DnsName "contoso.org" -CertStoreLocation "cert:\CurrentUser\My" -NotAfter (Get-Date).AddYears(1) -KeySpec KeyExchange
355+
356+
# Export the X.509 certificate and the associated private key to a password-protected .pfx file
357+
$mycert | Export-PfxCertificate -FilePath mycert.pfx -Password (Get-Credential).password
358+
359+
# Export the X.509 public certificate to a .cer file
360+
$mycert | Export-Certificate -FilePath mycert.cer
361+
```
353362
354363
- Use the [Create-SelfSignedCertificate script](https://github.com/SharePoint/PnP-Partner-Pack/blob/master/scripts/Create-SelfSignedCertificate.ps1) script to generate SHA1 certificates.
355364
356365
```powershell
357-
.\Create-SelfSignedCertificate.ps1 -CommonName "MyCompanyName" -StartDate 2021-01-06 -EndDate 2022-01-06
366+
.\Create-SelfSignedCertificate.ps1 -CommonName "MyCompanyName" -StartDate 2026-01-06 -EndDate 2027-01-06
358367
```
359368
360369
### Step 4: Attach the certificate to the Microsoft Entra application
@@ -375,12 +384,10 @@ After you register the certificate with your application, you can use the privat
375384

376385
![Select Upload certificate on the Certificates & secrets page.](media/exo-app-only-auth-select-upload-certificate.png)
377386

378-
In the dialog that opens, browse to the self-signed certificate (`.cer` file) that you created in [Step 3](#step-3-generate-a-self-signed-certificate).
387+
In the **Upload certificate** flyout that opens, browse to the public certificate (`.cer` file) you exported in [Step 3](#step-3-generate-a-certificate), and then select **Add**.
379388

380389
![Browse to the certificate and then select Add.](media/exo-app-only-auth-upload-certificate-dialog.png)
381390

382-
When you're finished, select **Add**.
383-
384391
The certificate is now shown in the **Certificates** section.
385392

386393
![Application page showing that the certificate was added.](media/exo-app-only-auth-certificate-successfully-added.png)
@@ -405,19 +412,17 @@ For more information about the URL syntax, see [Request the permissions from a d
405412

406413
You have the following options:
407414

408-
- **Option 1: Assign Microsoft Entra roles to the application**: Use built-in Microsoft Entra roles to grant all permissions of the role. You can't customize or scope these roles.
409-
410-
- **Option 2: Assign custom role groups to the application using service principals**: We recommend this option in the following scenarios:
415+
- [Option 1: Assign Microsoft Entra roles to the application](#option-1-assign-microsoft-entra-roles-to-the-application): Use built-in Microsoft Entra roles to grant all permissions of the role. You can't customize or scope these roles.
416+
417+
- [Option 2: Assign custom role groups to the application using service principals](#option-2-assign-custom-role-groups-to-the-application-using-service-principals): We recommend this option in the following scenarios:
411418
- You need to restrict the available commands in your application.
412419
- You need to use a Write scope to limit which recipients can be modified.
413420

414-
- **Option 3: Combine Microsoft Entra roles with custom role groups**: We recommend this method to extend a built-in Microsoft Entra role (for example, the **Exchange Recipient Administrator** role) by granting extra permissions from a custom role.
421+
- <u>Option 3: Combine Microsoft Entra roles with custom role groups</u>: RBAC combines permissions from all sources. We recommend this method to extend the capabilities of a built-in Microsoft Entra role. For example, you can extend the capabilities of the **Exchange Recipient Administrator** role by granting extra permissions from a custom role.
415422

416423
These options are described in the following subsections.
417424

418425
> [!NOTE]
419-
> RBAC combines permissions from all sources. For example, you can use the **Exchange Recipient Administrator** role in Microsoft Entra and also assign your custom RBAC role to extend the permissions.
420-
>
421426
> For multitenant applications in **Exchange Online** delegated scenarios, you need to assign permissions in each customer tenant.
422427
423428
<a name="assign-microsoft-entra-roles-to-the-application"></a>
69.2 KB
Loading
70.4 KB
Loading
1011 Bytes
Loading

exchange/exchange-ps/ExchangePowerShell/Complete-MigrationBatch.md

Lines changed: 30 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ title: Complete-MigrationBatch
1313
## SYNOPSIS
1414
This cmdlet is available in on-premises Exchange and in the cloud-based service. Some parameters and settings might be exclusive to one environment or the other.
1515

16-
Use the Complete-MigrationBatch cmdlet to finalize a migration batch for a local move, cross-forest move, or remote move migration that has successfully finished initial synchronization.
16+
Use the Complete-MigrationBatch cmdlet to finalize a migration batch that has successfully finished initial synchronization.
1717

1818
For information about the parameter sets in the Syntax section below, see [Exchange cmdlet syntax](https://learn.microsoft.com/powershell/exchange/exchange-cmdlet-syntax).
1919

@@ -32,17 +32,22 @@ Complete-MigrationBatch [[-Identity] <MigrationBatchIdParameter>]
3232
```
3333

3434
## DESCRIPTION
35-
After a migration batch for a local or cross-forest move has successfully run and has a status state of Synced, use the Complete-MigrationBatch cmdlet to finalize the migration batch. Finalization is the last phase performed during a local or cross-forest move. When you finalize a migration batch, the cmdlet does the following for each mailbox in the migration batch:
35+
After a migration batch has successfully run and has a status of Synced or SyncedWithErrors, use the Complete-MigrationBatch cmdlet to finalize the migration batch. When you finalize a migration batch, the cmdlet does the following for each mailbox in the migration batch:
3636

3737
- Runs a final incremental synchronization.
3838
- Configures the user's Microsoft Outlook profile to point to the new target domain.
3939
- Converts the source mailbox to a mail-enabled user in the source domain.
4040

41-
In the cloud-based service, this cmdlet sets the value of CompleteAfter to the current time. It is important to remember that any CompleteAfter setting applied to the individual users within the batch overrides the setting on the batch, so the completion for some users might be delayed until their configured time.
41+
In the cloud-based service, this cmdlet sets the CompleteAfter value to the current UTC time, which signals the migration service to complete the batch as soon as possible. This is equivalent in intent to running `Set-MigrationBatch -CompleteAfter (Get-Date)`, but without timezone conversion ambiguity.
42+
43+
Note the following behavior when using this cmdlet in Exchange Online:
44+
45+
- Any CompleteAfter setting applied to individual users within the batch overrides the batch-level setting, so completion for some users might be delayed until their configured time.
46+
- If you run this cmdlet multiple times within 8 hours after the batch has already been signaled for completion, the migration service may not re-process the request. This behavior is by design to prevent repeated calls from starving the service. If the batch appears stuck after running the cmdlet, check for unapproved skipped items (use `Set-MigrationUser -ApproveSkippedItems`).
4247

4348
When the finalization process is complete, you can remove the batch by using the Remove-MigrationBatch cmdlet.
4449

45-
If a migration batch has a status of Completed with Errors, you can re-attempt to finalize the failed users. In Exchange Online, use the Start-MigrationBatch cmdlet to retry migration for failed users. In Exchange 2013 or Exchange 2016, use the Complete-MigrationBatch to retry these failed users.
50+
If a migration batch has a status of Completed with Errors, you can re-attempt to finalize the failed users. In Exchange Online, use the Start-MigrationBatch cmdlet to retry migration for failed users. In Exchange 2013 or later, use the Complete-MigrationBatch to retry these failed users.
4651

4752
You need to be assigned permissions before you can run this cmdlet. Although this article lists all parameters for the cmdlet, you might not have access to some parameters if they aren't included in the permissions assigned to you. To find the permissions required to run any cmdlet or parameter in your organization, see [Find the permissions required to run any Exchange cmdlet](https://learn.microsoft.com/powershell/exchange/find-exchange-cmdlet-permissions).
4853

@@ -159,7 +164,6 @@ Default value: None
159164
Accept pipeline input: False
160165
Accept wildcard characters: False
161166
```
162-
163167
### -Partition
164168

165169
> Applicable: Exchange Online
@@ -184,7 +188,11 @@ Accept wildcard characters: False
184188

185189
> Applicable: Exchange Server 2016, Exchange Server 2019, Exchange Server SE, Exchange Online
186190

187-
The SyncAndComplete switch specifies whether to trigger a synchronization immediately followed by a completion of the migration batch if the synchronization was successful. You don't need to specify a value with this switch.
191+
The SyncAndComplete switch specifies whether to trigger a final incremental synchronization immediately followed by completion of the migration batch if the synchronization was successful. You don't need to specify a value with this switch.
192+
193+
When this switch is used, the batch must have zero failed, corrupted, or stopped items; otherwise, the cmdlet returns an error.
194+
195+
**Note:** For Public Folder migration batches, this switch is enabled by default unless the CompletePublicFolderMigrationWithDataLoss switch is also specified.
188196

189197
```yaml
190198
Type: SwitchParameter
@@ -222,13 +230,27 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
222230
## INPUTS
223231

224232
### Input types
225-
To see the input types that this cmdlet accepts, see [Cmdlet Input and Output Types](https://go.microsoft.com/fwlink/p/?linkId=616387). If the Input Type field for a cmdlet is blank, the cmdlet doesn't accept input data.
233+
To see the input types that this cmdlet accepts, see [Cmdlet Input and Output Types](https://go.microsoft.com/fwlink/p/?linkId=616387). If the Input Type field for a cmdlet is blank, the cmdlet does not accept input data.
226234

227235
## OUTPUTS
228236

229237
### Output types
230-
To see the return types, which are also known as output types, that this cmdlet accepts, see [Cmdlet Input and Output Types](https://go.microsoft.com/fwlink/p/?linkId=616387). If the Output Type field is blank, the cmdlet doesn't return data.
238+
To see the return types, which are also known as output types, that this cmdlet accepts, see [Cmdlet Input and Output Types](https://go.microsoft.com/fwlink/p/?linkId=616387). If the Output Type field is blank, the cmdlet does not return data.
231239

232240
## NOTES
233241

242+
In Exchange Online, this cmdlet is supported for the following migration types:
243+
244+
- Exchange Local Move
245+
- Exchange Remote Move
246+
- Gmail
247+
- Google Resource
248+
- Local Relocation
249+
- Folder Move
250+
- PST Import
251+
- Public Folder
252+
- Public Folder to Unified Group
253+
254+
In Exchange Online, this cmdlet isn't supported for IMAP, staged Exchange Outlook Anywhere (cutover), or Bulk Provisioning migrations, which don't have a finalization step.
255+
234256
## RELATED LINKS

exchange/exchange-ps/ExchangePowerShell/Get-Label.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ Get-Label [[-Identity] <ComplianceRuleIdParameter>]
2929
```
3030

3131
## DESCRIPTION
32+
**Note**: If your organization has more han 1000 sensitivity labels, the timeout settings set for the Powershell session may cause performance issues. Use the SkipValidations parameter to retrieve labels more efficiently.
33+
3234
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).
3335

3436
## EXAMPLES
@@ -113,7 +115,13 @@ Accept wildcard characters: False
113115
114116
> Applicable: Security & Compliance
115117
116-
{{ Fill SkipValidations Description }}
118+
The SkipValidations switch specifies whether to skip the retrieval of encryption properties configured in sensitivity labels. You don't need to specify a value with this switch.
119+
120+
Organizations with more than 1000 labels can use this switch to reduce the time required to fetch the labels, which helps prevent timeout issues with Get-Label cmdlet.
121+
122+
**Note**: Using this switch doesn't skip validations when you retrieve labels. It only skips the the retrieval of encryption template properties if they're configured for a label. You can get those properties individually by using the Identity parameter in the Get-Label command.
123+
124+
This switch doesn't affect label application or distribution. The limitation exists only when fetching labels for CRUD operations.
117125
118126
```yaml
119127
Type: SwitchParameter

0 commit comments

Comments
 (0)