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
+35-30Lines changed: 35 additions & 30 deletions
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
---
2
-
title: App-only authentication
2
+
title: App-only authentication in Exchange Online PowerShell and Security & Compliance PowerShell
3
3
ms.author: chrisda
4
4
author: chrisda
5
5
manager: dansimp
@@ -14,18 +14,20 @@ ms.collection: Strat_EX_Admin
14
14
ms.custom:
15
15
ms.assetid:
16
16
search.appverid: MET150
17
-
description: "Learn about using the Exchange Online V2 module in scripts and other long-running tasks with modern authentication and app-only authentication."
17
+
description: "Learn about using the Exchange Online PowerShell V2 module and V3 module in scripts and other long-running tasks with modern authentication and app-only authentication (also known a certificate based authentication or CBA)."
18
18
---
19
19
20
-
# App-only authentication for unattended scripts in the EXO V2 module
20
+
# App-only authentication for unattended scripts in Exchange Online PowerShell and Security & Compliance PowerShell
21
21
22
22
> [!NOTE]
23
23
>
24
-
> - The features and procedures described in this article require the following versions of the EXO V2 module:
24
+
> - The features and procedures described in this article require the following versions of the Exchange Online PowerShell module:
25
25
> -**Exchange Online PowerShell (Connect-ExchangeOnline)**: Version 2.0.3 or later.
26
-
> -**Security & Compliance PowerShell (Connect-IPPSSession)**: Version 2.0.6Preview5 or later.
26
+
> -**Security & Compliance PowerShell (Connect-IPPSSession)**: Version 2.0.6-Preview5 or later.
27
27
>
28
-
> For instructions on how to install or update the module on clients or servers, see [Install and maintain the EXO V2 module](exchange-online-powershell-v2.md#install-and-maintain-the-exo-v2-module). For instructions on how to use the module in Azure automation, see [Manage modules in Azure Automation](/azure/automation/shared-resources/modules).
28
+
> For instructions on how to install or update the module, see [Install and maintain the Exchange Online PowerShell module](exchange-online-powershell-v2.md#install-and-maintain-the-exchange-online-powershell-module). For instructions on how to use the module in Azure automation, see [Manage modules in Azure Automation](/azure/automation/shared-resources/modules).
29
+
>
30
+
> - Version 2.0.5 and earlier is known as the Exchange Online PowerShell V2 module (abbreviated as the EXO V2 module). Version 3.0.0 and later is known as the Exchange Online PowerShell V3 module (abbreviated as the EXO V3 module).
29
31
>
30
32
> - In Exchange Online PowerShell, you can't use the procedures in this article with the following Microsoft 365 Group cmdlets:
@@ -44,63 +46,66 @@ Auditing and reporting scenarios in Microsoft 365 often involve unattended scrip
44
46
45
47
Certificate based authentication (CBA) or app-only authentication as described in this article supports unattended script and automation scenarios by using Azure AD apps and self-signed certificates.
46
48
47
-
The following examples show how to use the Exchange Online PowerShell V2 module with app-only authentication:
49
+
The following examples show how to use the Exchange Online PowerShell module with app-only authentication:
48
50
49
51
> [!IMPORTANT]
50
-
> In the **Connect-** commands, be sure to use an `.onmicrosoft.com` domain for the _Organization_ parameter value. Otherwise, you might encounter cryptic permission issues when you run commands in the app context.
52
+
> In the following **Connect-** commands, be sure to use an `.onmicrosoft.com` domain for the _Organization_ parameter value. Otherwise, you might encounter cryptic permission issues when you run commands in the app context.
53
+
54
+
-**Connect using a certificate thumbprint**:
51
55
52
-
- Connect using a local certificate:
56
+
The certificate needs to be installed on the computer where you're running the command. The certificate should be installed in the user certificate store.
The certificate does not need to be installed on the computer where you're running the command. You can store the certificate object remotely. The certificate is fetched when the script is run.
When you use the _CertificateThumbPrint_ parameter, the certificate needs to be installed on the computer where you are running the command. The certificate should be installed in the user certificate store.
86
+
- **Connect using a local certificate**:
81
87
82
-
- Connect using a certificate object:
88
+
> [!NOTE]
89
+
> Using a **ConvertTo-SecureString** command to store the password of the certificate locally defeats the purpose of a secure connection method for automation scenarios. Using a **Get-Credential** command to prompt you for the password of the certificate securely isn't ideal for automation scenarios. In other words, there's really no automated _and_ secure way to connect using a local certificate.
When you use the _Certificate_ parameter, the certificate does not need to be installed on the computer where you are running the command. This parameter is applicable for scenarios where the certificate object is stored remotely and fetched at runtime during script execution.
97
-
98
103
> [!TIP]
99
104
> App-only authentication does not support delegation. Unattended scripting in delegation scenarios is supported with the Secure App Model. For more information, go [here](/powershell/partnercenter/multi-factor-auth#exchange).
100
105
101
106
## How does it work?
102
107
103
-
The EXO V2 module uses the Active Directory Authentication Library to fetch an app-only token using the application Id, tenant Id (organization), and certificate thumbprint. The application object provisioned inside Azure AD has a Directory Role assigned to it, which is returned in the access token. The session's role based access control (RBAC) is configured using the directory role information that's available in the token.
108
+
The Exchange Online PowerShell module uses the Active Directory Authentication Library to fetch an app-only token using the application Id, tenant Id (organization), and certificate thumbprint. The application object provisioned inside Azure AD has a Directory Role assigned to it, which is returned in the access token. The session's role based access control (RBAC) is configured using the directory role information that's available in the token.
104
109
105
110
## Set up app-only authentication
106
111
@@ -231,7 +236,7 @@ Create a self-signed x.509 certificate using one of the following methods:
Copy file name to clipboardExpand all lines: exchange/docs-conceptual/basic-auth-connect-to-eop-powershell.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,7 @@ description: "Use remote PowerShell to connect to a standalone Exchange Online P
17
17
# Bssic auth - Connect to Exchange Online Protection PowerShell
18
18
19
19
> [!NOTE]
20
-
> The connection instructions in this article [will be deprecated starting on October 1, 2022](https://techcommunity.microsoft.com/t5/exchange-team-blog/basic-authentication-deprecation-in-exchange-online-september/ba-p/3609437) due to the security concerns around Basic authentication. Instead, you should use the Exchange Online PowerShell V2 module (the EXO V2 module) to connect to Exchange Online Protection PowerShell. For instructions, see [Connect to Exchange Online Protection PowerShell](connect-to-exchange-online-protection-powershell.md).
20
+
> The connection instructions in this article [will be deprecated starting on October 1, 2022](https://techcommunity.microsoft.com/t5/exchange-team-blog/basic-authentication-deprecation-in-exchange-online-september/ba-p/3609437) due to the security concerns around Basic authentication. Instead, you should use the [Exchange Online PowerShell module](exchange-online-powershell-v2.md) to connect to Exchange Online Protection PowerShell. For instructions, see [Connect to Exchange Online Protection PowerShell](connect-to-exchange-online-protection-powershell.md).
21
21
22
22
In standalone Exchange Online Protection (EOP) organizations without Exchange Online mailboxes, standalone EOP PowerShell allows you to manage your EOP organization from the command line. You use Windows PowerShell on your local computer to create a remote PowerShell session to EOP. It's a simple three-step process where you enter your Microsoft 365 credentials, provide the required connection settings, and then import the EOP cmdlets into your local Windows PowerShell session so that you can use them.
Copy file name to clipboardExpand all lines: exchange/docs-conceptual/basic-auth-connect-to-exo-powershell.md
+1-2Lines changed: 1 addition & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -20,8 +20,7 @@ description: "Learn how to use remote PowerShell to connect to Exchange Online w
20
20
# Basic auth - Connect to Exchange Online PowerShell
21
21
22
22
> [!NOTE]
23
-
> The connection instructions in this article [will be deprecated starting on October 1, 2022](https://techcommunity.microsoft.com/t5/exchange-team-blog/basic-authentication-deprecation-in-exchange-online-september/ba-p/3609437) due to the security concerns around Basic authentication. Instead, you should use the Exchange Online PowerShell V2 module (the EXO V2 module) to connect to Exchange Online PowerShell.
24
-
If you're using PowerShell for administration, see [Connect to Exchange Online PowerShell](connect-to-exchange-online-powershell.md). If you're using PowerShell for automation, see [App-only authentication for unattended scripts](app-only-auth-powershell-v2.md).
23
+
> The connection instructions in this article [will be deprecated starting on October 1, 2022](https://techcommunity.microsoft.com/t5/exchange-team-blog/basic-authentication-deprecation-in-exchange-online-september/ba-p/3609437) due to the security concerns around Basic authentication. Instead, you should use the [Exchange Online PowerShell module](exchange-online-powershell-v2.md) to connect to Exchange Online PowerShell. If you're using PowerShell for administration, see [Connect to Exchange Online PowerShell](connect-to-exchange-online-powershell.md). If you're using PowerShell for automation, see [App-only authentication for unattended scripts](app-only-auth-powershell-v2.md).
25
24
26
25
Exchange Online PowerShell allows you to manage your Exchange Online settings from the command line. You use Windows PowerShell on your local computer to create a remote PowerShell session to Exchange Online. It's a simple three-step process where you enter your Microsoft 365 credentials, provide the required connection settings, and then import the Exchange Online cmdlets into your local Windows PowerShell session so that you can use them.
Copy file name to clipboardExpand all lines: exchange/docs-conceptual/basic-auth-connect-to-scc-powershell.md
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -18,7 +18,7 @@ description: "Learn how to connect to Security & Compliance PowerShell."
18
18
# Basic auth - Connect to Security & Compliance PowerShell
19
19
20
20
> [!NOTE]
21
-
> The connection instructions in this article [will be deprecated starting on October 1, 2022](https://techcommunity.microsoft.com/t5/exchange-team-blog/basic-authentication-deprecation-in-exchange-online-september/ba-p/3609437) due to the security concerns around Basic authentication. Instead, you should use the Exchange Online PowerShell V2 module (the EXO V2 module) to connect to Security & Compliance PowerShell. If you're using PowerShell for administration, see [Connect to Security & Compliance PowerShell](connect-to-scc-powershell.md). If you're using PowerShell for automation, see [App-only authentication for unattended scripts](app-only-auth-powershell-v2.md).
21
+
> The connection instructions in this article [will be deprecated starting on October 1, 2022](https://techcommunity.microsoft.com/t5/exchange-team-blog/basic-authentication-deprecation-in-exchange-online-september/ba-p/3609437) due to the security concerns around Basic authentication. Instead, you should use the [Exchange Online PowerShell module](exchange-online-powershell-v2.md) to connect to Security & Compliance PowerShell. If you're using PowerShell for administration, see [Connect to Security & Compliance PowerShell](connect-to-scc-powershell.md). If you're using PowerShell for automation, see [App-only authentication for unattended scripts](app-only-auth-powershell-v2.md).
22
22
23
23
Security & Compliance PowerShell allows you to manage your Microsoft 365 Defender portal and Microsoft Purview compliance portal settings from the command line. You use Windows PowerShell on your local computer to create a remote PowerShell session to Security & Compliance PowerShell. It's a simple three-step process where you enter your Microsoft 365 credentials, provide the required connection settings, and then import the Security & Compliance PowerShell cmdlets into your local Windows PowerShell session so that you can use them.
24
24
@@ -29,7 +29,7 @@ Security & Compliance PowerShell allows you to manage your Microsoft 365 Defende
29
29
> - Your organization uses federated authentication.
30
30
> - A location condition in an Azure Active Directory conditional access policy restricts your access to trusted IPs.
31
31
>
32
-
> In these scenarios, you need to download and use the Exchange Online PowerShell V2 module (EXO V2 module) to connect to Security & Compliance PowerShell. For instructions, see [Connect to Security & Compliance PowerShell](connect-to-scc-powershell.md).
32
+
> In these scenarios, you need to download and use the Exchange Online PowerShell module to connect to Security & Compliance PowerShell. For instructions, see [Connect to Security & Compliance PowerShell](connect-to-scc-powershell.md).
33
33
>
34
34
> Some features in the Microsoft 365 Defender portal and Microsoft Purview compliance portal (for example, mailbox archiving) link to existing functionality in Exchange Online. To use PowerShell with these features, you need to connect to Exchange Online PowerShell instead of Security & Compliance PowerShell. For instructions, see [Connect to Exchange Online PowerShell](connect-to-exchange-online-powershell.md).
Copy file name to clipboardExpand all lines: exchange/docs-conceptual/cmdlet-property-sets.md
+8-5Lines changed: 8 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
---
2
-
title: Property sets in Exchange Online PowerShell V2 cmdlets
2
+
title: Property sets in Exchange Online PowerShell module cmdlets
3
3
ms.author: chrisda
4
4
author: chrisda
5
5
manager: dansimp
@@ -14,14 +14,17 @@ ms.collection: Strat_EX_Admin
14
14
ms.custom:
15
15
ms.assetid:
16
16
search.appverid: MET150
17
-
description: "Admins can lear about the property sets that are available in the Get-EXO* cmdlets in the Exchange Online PowerShell V2 module."
17
+
description: "Admins can lear about the property sets that are available in the nine exclusive Get-EXO cmdlets in the Exchange Online PowerShell V2 module and V3 module."
18
18
---
19
19
20
-
# Property sets in Exchange Online PowerShell V2 cmdlets
20
+
# Property sets in Exchange Online PowerShell module cmdlets
21
21
22
-
This article describes the property sets that are available in the **Get-EXO\*** cmdlets in the [Exchange Online PowerShell V2 module](exchange-online-powershell-v2.md). For more information about property sets, see [Properties and property sets in the EXO V2 module](exchange-online-powershell-v2.md#properties-and-property-sets-in-the-exo-v2-module).
22
+
This article describes the property sets that are available in the nine exclusive **Get-EXO\***[cmdlets in the Exchange Online PowerShell module](exchange-online-powershell-v2.md#cmdlets-in-the-exchange-online-powershell-module). For more information about property sets, see [Properties and property sets in the Exchange Online PowerShell module](exchange-online-powershell-v2.md#properties-and-property-sets-in-the-exchange-online-powershell-module).
23
23
24
-
For more information about filtering in the EXO V2 module, see [Filters in the EXO V2 module](filters-v2.md).
24
+
For more information about filtering with cmdlets in the module, see [Filters in the Exchange Online PowerShell module](filters-v2.md).
25
+
26
+
> [!NOTE]
27
+
> Version 2.0.5 and earlier is known as the Exchange Online PowerShell V2 module (abbreviated as the EXO V2 module). Version 3.0.0 and later is known as the Exchange Online PowerShell V3 module (abbreviated as the EXO V3 module).
0 commit comments