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
+27-10Lines changed: 27 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -14,30 +14,42 @@ ms.custom:
14
14
ms.assetid:
15
15
search.appverid: MET150
16
16
ROBOTS: NOINDEX, NOFOLLOW
17
-
description: "Learn about using the Exchange Online V2 module in scripts and other long-running tasks."
17
+
description: "Learn about using the Exchange Online V2 module in scripts and other long-running tasks with modern authentication and app-only authentication."
18
18
---
19
19
20
-
# Automate tasks in Exchange Online using PowerShell with Modern Authentication
20
+
# App-only authentication for unattended scripts in the EXO V2 module
21
21
22
22
> [!NOTE]
23
-
> The features described in this topic are currently in Preview, are subject to change, and aren't available to everyone.
23
+
> This feature is currently in Public Preview, and is available in the Preview release of Exchange Online PowerShell V2 Module.
24
24
25
-
Auditing and reporting scenarios in Exchange Online often involve scripts that run unattended. In most cases, these unattended scripts access Exchange Online PowerShell using Basic authentication (a username and password). Even when the connection to Exchange Online PowerShell uses Modern authentication, the credentials are stored in a local file or a secret vault that's access at run-time.
25
+
To install the Preview release of the EXO V2 module, run the following command:
26
26
27
-
Because storing user credentials locally is not a good security practice, we're releasing this feature to support authentication for app-only scenarios using AzureAD applications and self-signed certificates.
Auditing and reporting scenarios in Exchange Online often involve scripts that run unattended. In most cases, these unattended scripts access Exchange Online PowerShell using Basic authentication (a username and password). Even when the connection to Exchange Online PowerShell uses modern authentication, the credentials are stored in a local file or a secret vault that's access at run-time.
38
+
39
+
Because storing user credentials locally is not a safe practice, we're releasing this feature to support authentication for unattended scripts (automation) scenarios using AzureAD applications and self-signed certificates.
40
+
41
+
The following examples show how to use the Exchange Online PowerShell V2 module with app-only authentication:
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.
@@ -80,7 +92,10 @@ For a detailed visual flow bout creating applications in Azure AD, see <https://
80
92
81
93
- Create and configure a self-signed X.509 certificate, which will be used to authenticate your Application against Azure AD, while requesting the app-only access token.
82
94
83
-
- This is similar to generating a password for user accounts. The certificate can be self-signed as well. See the [Appendix](#appendix) section later in this topic for instructions for generating certificates in PowerShell.
95
+
- This is similar to generating a password for user accounts. The certificate can be self-signed as well. See the [Appendix](#step-3-generate-a-self-signed-certificate) section later in this topic for instructions for generating certificates in PowerShell.
96
+
97
+
> [!NOTE]
98
+
> Cryptography: Next Generation (CNG) certificates are not supported for app-only authentication with Exchange. CNG certificates are created by default in modern Windows versions. You must use a certificate from a CSP key provider. The [Appendix](#step-3-generate-a-self-signed-certificate) section covers two supported methods to create a CSP certificate.
84
99
85
100
4. Assign RBAC roles
86
101
@@ -91,7 +106,7 @@ For a detailed visual flow bout creating applications in Azure AD, see <https://
91
106
- Security reader
92
107
- Security administrator
93
108
- Helpdesk administrator
94
-
- Exchange Service administrator
109
+
- Exchange administrator
95
110
- Global Reader
96
111
97
112
## Appendix
@@ -185,6 +200,8 @@ Azure AD has more than 50 admin roles available. For app-only authentication in
185
200
- Security reader
186
201
- Security administrator
187
202
- Helpdesk administrator
203
+
- Exchange Service administrator
204
+
- Global Reader
188
205
189
206
1. In the Azure AD portal under **Manage Azure Active Directory**, click **View**.
Copy file name to clipboardExpand all lines: exchange/docs-conceptual/connect-to-exchange-online-powershell.md
+11-9Lines changed: 11 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
---
2
-
title: "Connect to Exchange Online PowerShell"
2
+
title: "Connect to Exchange Online PowerShell with Basic authentication"
3
3
ms.author: chrisda
4
4
author: chrisda
5
5
manager: dansimp
@@ -12,18 +12,20 @@ ms.collection: Strat_EX_Admin
12
12
ms.custom:
13
13
ms.assetid: c8bea338-6c1a-4bdf-8de0-7895d427ee5b
14
14
search.appverid: MET150
15
-
description: "Learn how to use remote PowerShell to connect to Exchange Online."
15
+
description: "Learn how to use remote PowerShell to connect to Exchange Online with Basic authentication."
16
16
---
17
17
18
-
# Connect to Exchange Online PowerShell
19
-
20
-
> [!NOTE]
21
-
> We recommend that you use the Exchange Online PowerShell V2 module to connect to Exchange Online PowerShell. For instructions, see [Use the Exchange Online PowerShell V2 module](exchange-online-powershell-v2.md).
18
+
# Connect to Exchange Online PowerShell with Basic authentication
22
19
23
20
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.
24
21
25
-
> [!IMPORTANT]
26
-
> If you want to use multi-factor authentication (MFA) to connect to Exchange Online PowerShell, you need to download and use the Exchange Online Remote PowerShell Module. For more information, see [Connect to Exchange Online PowerShell using multi-factor authentication](mfa-connect-to-exchange-online-powershell.md). <br/><br/> If you're a standalone Exchange Online Protection (EOP) customer (for example, you're using EOP to protect your on-premises email environment), use the connection instructions in [Connect to Exchange Online Protection PowerShell](connect-to-exchange-online-protection-powershell.md). If your on-premises Exchange organization has Exchange Enterprise CAL with Services licenses, EOP is one of the included services, and the connection instructions in this topic will work for you.
22
+
> [!NOTE]
23
+
>
24
+
> - We're eventually going to [disable Basic authentication in Exchange Online](https://techcommunity.microsoft.com/t5/exchange-team-blog/basic-authentication-and-exchange-online-april-2020-update/ba-p/1275508), and the connection method described in this topic uses Basic authentication. We recommend that you use the [Exchange Online PowerShell V2 module](exchange-online-powershell-v2.md) to connect to Exchange Online PowerShell, because it uses modern authentication in all scenarios.
25
+
>
26
+
> - The Exchange Online PowerShell V2 module works with multi-factor authentication (MFA). For MFA connection instructions using the older Exchange Online Remote PowerShell Module, see [Connect to Exchange Online PowerShell using multi-factor authentication](mfa-connect-to-exchange-online-powershell.md).
27
+
>
28
+
> - If you're a standalone Exchange Online Protection (EOP) customer (for example, you're using EOP to protect your on-premises email environment), use the connection instructions in [Connect to Exchange Online Protection PowerShell](connect-to-exchange-online-protection-powershell.md). If your on-premises Exchange organization has Exchange Enterprise CAL with Services licenses, EOP is one of the included services, and the connection instructions in this topic will work for you.
27
29
28
30
## What do you need to know before you begin?
29
31
@@ -104,7 +106,7 @@ Exchange Online PowerShell allows you to manage your Exchange Online settings fr
104
106
- For Office 365 Germany, use the _ConnectionUri_ value: `https://outlook.office.de/powershell-liveid/`
105
107
106
108
- For Microsoft 365 Government Community Cloud High (GCC High), use the _ConnectionUri_ value: `https://outlook.office365.us/powershell-liveid/`
107
-
109
+
108
110
- For Microsoft 365 DoD, use the _ConnectionUri_ value: `https://webmail.apps.mil/powershell-liveid`
109
111
110
112
- If you're behind a proxy server, run this command first: `$ProxyOptions = New-PSSessionOption -ProxyAccessType <Value>`, where the _ProxyAccessType_ value is `IEConfig`, `WinHttpConfig`, or `AutoDetect`.
Copy file name to clipboardExpand all lines: exchange/docs-conceptual/exchange-online-powershell-v2.md
+8-7Lines changed: 8 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
---
2
-
title: Exchange Online PowerShell V2
2
+
title: Exchange Online PowerShell with modern authentication using V2 Module
3
3
ms.author: chrisda
4
4
author: chrisda
5
5
manager: dansimp
@@ -13,14 +13,15 @@ ms.collection: Strat_EX_Admin
13
13
ms.custom:
14
14
ms.assetid:
15
15
search.appverid: MET150
16
-
description: "Learn how to download and use the Exchange Online PowerShell V2 module to connect to Exchange Online PowerShell."
16
+
description: "Learn how to install and use the Exchange Online PowerShell V2 module to connect to Exchange Online PowerShell with modern authentication."
17
17
---
18
18
19
-
# Use the Exchange Online PowerShell V2 module
19
+
# Use the Exchange Online PowerShell with modern authentication using V2 module
20
20
21
21
The Exchange Online PowerShell V2 module (abbreviated as the EXO V2 module) enables admins to connect to their Exchange Online environment in Microsoft 365 to retrieve data, create new objects, update existing objects, remove objects as well as configure Exchange Online and its features.
22
22
23
23
## Report bugs and issues
24
+
24
25
When you report an issue, be sure to include the log files in your email message. To generate the log files, replace \<Path to store log file\> with the output folder you want, and run the following command:
25
26
26
27
```PowerShell
@@ -31,14 +32,14 @@ Connect-ExchangeOnline -EnableErrorReporting -LogDirectoryPath <Path to store lo
31
32
32
33
The Exchange Online PowerShell V2 module contains a small set of new cmdlets that are optimized for bulk data retrieval scenarios (think: thousands and thousands of objects). Until you create a session to connect to your Exchange Online organization, you'll only see these new cmdlets in the module. After you connect to your Exchange Online organization, you'll see all of the older remote PowerShell cmdlets.
33
34
34
-
The EXO V2 module use Modern authentication for all cmdlets. You can't use Basic authentication in the EXO V2 module; however, you still need to configure the Basic authentication setting in WinRM as described later in this topic.
35
+
The EXO V2 module use modern authentication for all cmdlets. You can't use Basic authentication in the EXO V2 module; however, you still need to configure the Basic authentication setting in WinRM as described later in this topic.
35
36
36
37
The new cmdlets in the EXO V2 module are meant to replace their older, less efficient equivalents. However, the original cmdlets are still available in the EXO V2 module for backwards compatibility **after** you create a session to connect to your Exchange Online organization.
37
38
38
39
The new cmdlets in the EXO V2 module are listed in the following table:
39
40
40
-
|**New cmdlet in the EXO V2 module**|**Older related cmdlet**|
41
-
|:-----|:-----|
41
+
|New cmdlet in the EXO V2 module|Older related cmdlet|
42
+
|---|---|
42
43
|[Connect-ExchangeOnline](../exchange-ps/exchange/Connect-ExchangeOnline.md)|[Connect-EXOPSSession](mfa-connect-to-exchange-online-powershell.md) <br/> or <br/> [New-PSSession](https://docs.microsoft.com/powershell/module/microsoft.powershell.core/new-pssession)|
@@ -57,7 +58,7 @@ The new cmdlets in the EXO V2 module are listed in the following table:
57
58
You can download the EXO V2 module from the PowerShell gallery [here](https://www.powershellgallery.com/packages/ExchangeOnlineManagement/).
58
59
59
60
> [!NOTE]
60
-
> Currently, the latest version of PowerShell that's supported for the EXO V2 module is PowerShell 5.1. Support for later versions of PowerShell (and by definition, support for Linux or Mac) is a work in progress and will be announced soon.
61
+
> Currently, the latest version of PowerShell that's supported for the EXO V2 module is PowerShell 5.1. Support for later versions of PowerShell (and by definition, support for Linux or Mac) is a work in progress.
0 commit comments