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
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -54,15 +54,15 @@ The following examples show how to use the Exchange Online PowerShell V2 module
54
54
>
55
55
> - In the **Connect-ExchangeOnline** commands, be sure to use an `.onmicrosoft.com` domain in the _Organization_ parameter value. Otherwise, you might encounter cryptic permission issues when you run commands in the app context.
56
56
>
57
-
> - App-only authentication does not support delegation. Unattended scripting in delegation scenarios is supported with the Secure App Model. For more information, go [here](https://docs.microsoft.com/powershell/partnercenter/multi-factor-auth#exchange).
57
+
> - 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).
58
58
59
59
## How does it work?
60
60
61
61
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. Exchange Online configures the session RBAC using the directory role information that's available in the token.
62
62
63
63
## Set up app-only authentication
64
64
65
-
An initial onboarding is required for authentication using application objects. Application and service principal are used interchangeably, but an application is like a class object while a service principal is like an instance of the class. You can learn more about this at [Application and service principal objects in Azure Active Directory](https://docs.microsoft.com/azure/active-directory/develop/app-objects-and-service-principals).
65
+
An initial onboarding is required for authentication using application objects. Application and service principal are used interchangeably, but an application is like a class object while a service principal is like an instance of the class. You can learn more about this at [Application and service principal objects in Azure Active Directory](/azure/active-directory/develop/app-objects-and-service-principals).
66
66
67
67
For a detailed visual flow about creating applications in Azure AD, see <https://aka.ms/azuread-app>.
68
68
@@ -101,7 +101,7 @@ For a detailed visual flow about creating applications in Azure AD, see <https:/
101
101
102
102
## Step 1: Register the application in Azure AD
103
103
104
-
**Note**: If you encounter problems, check the [required permissions](https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal#required-permissions) to verify that your account can create the identity.
104
+
**Note**: If you encounter problems, check the [required permissions](/azure/active-directory/develop/howto-create-service-principal-portal#required-permissions) to verify that your account can create the identity.
105
105
106
106
1. Open the Azure AD portal at <https://portal.azure.com/>.
107
107
@@ -125,7 +125,7 @@ For a detailed visual flow about creating applications in Azure AD, see <https:/
125
125
126
126
-**Redirect URI (optional)**: In the first box, verify that **Web** is selected. In the second box, enter the URI where the access token is sent.
127
127
128
-
Note that you can't create credentials for [native applications](https://docs.microsoft.com/azure/active-directory/manage-apps/application-proxy-configure-native-client-application), because you can't use that type for automated applications.
128
+
Note that you can't create credentials for [native applications](/azure/active-directory/manage-apps/application-proxy-configure-native-client-application), because you can't use that type for automated applications.
129
129
130
130

131
131
@@ -186,7 +186,7 @@ For a detailed visual flow about creating applications in Azure AD, see <https:/
186
186
187
187
Create a self-signed x.509 certificate using one of the following methods:
188
188
189
-
- (Recommended) Use the [New-SelfSignedCertificate](https://docs.microsoft.com/powershell/module/pkiclient/new-selfsignedcertificate), [Export-Certificate](https://docs.microsoft.com/powershell/module/pkiclient/export-certificate) and [Export-PfxCertificate](https://docs.microsoft.com/powershell/module/pkiclient/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:
189
+
- (Recommended) Use the [New-SelfSignedCertificate](/powershell/module/pkiclient/new-selfsignedcertificate), [Export-Certificate](/powershell/module/pkiclient/export-certificate) and [Export-PfxCertificate](/powershell/module/pkiclient/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:
190
190
191
191
```powershell
192
192
# Create certificate
@@ -251,7 +251,7 @@ Azure AD has more than 50 admin roles available. For app-only authentication in
251
251
- Exchange administrator
252
252
- Global Reader
253
253
254
-
For general instructions about assigning roles in Azure AD, see [View and assign administrator roles in Azure Active Directory](https://docs.microsoft.com/azure/active-directory/roles/manage-roles-portal).
254
+
For general instructions about assigning roles in Azure AD, see [View and assign administrator roles in Azure Active Directory](/azure/active-directory/roles/manage-roles-portal).
255
255
256
256
1. On the Azure AD portal at <https://portal.azure.com/>, under **Manage Azure Active Directory**, click **View**.
Copy file name to clipboardExpand all lines: exchange/docs-conceptual/exchange-online-powershell-v2.md
+47-7Lines changed: 47 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -275,19 +275,59 @@ If the module is already installed on your computer, you can run the following c
275
275
276
276
For detailed syntax and parameter information, see [Update-Module](https://docs.microsoft.com/powershell/module/powershellget/update-module).
277
277
278
-
**Note**: If you receive the following error:
278
+
### Troubleshoot installing the EXO V2 module
279
279
280
-
> The specified module 'ExchangeOnlineManagement' with PowerShellGetFormatVersion '\<version\>' is not supported by the current version of PowerShellGet. Get the latest version of the PowerShellGet module to install this module, 'ExchangeOnlineManagement'.
280
+
- If you receive the following error:
281
281
282
-
Update your installation of the PowerShellGet module to the latest version as described in [Installing PowerShellGet](https://docs.microsoft.com/powershell/scripting/gallery/installing-psget). Be sure to close and re-open the elevated PowerShell window before you attempt to update the ExchangeOnlineManagement module again.
282
+
> The specified module 'ExchangeOnlineManagement' with PowerShellGetFormatVersion '\<version\>' is not supported by the current version of PowerShellGet. Get the latest version of the PowerShellGet module to install this module, 'ExchangeOnlineManagement'.
283
+
284
+
Update your installation of the PowerShellGet module to the latest version as described in [Installing PowerShellGet](https://docs.microsoft.com/powershell/scripting/gallery/installing-psget). Be sure to close and re-open the PowerShell window before you attempt to update the ExchangeOnlineManagement module again.
285
+
286
+
- As of April 2020, the PowerShell Gallery only supports connections using TLS 1.2 or later. For more information, see [PowerShell Gallery TLS Support](https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/).
287
+
288
+
To check your current settings in the Microsoft .NET Framework, run the following command in Windows PowerShell:
289
+
290
+
```powershell
291
+
[Net.ServicePointManager]::SecurityProtocol
292
+
```
293
+
294
+
As described in the PowerShell Gallery TLS Support article, to *temporarily* change the security protocol to TLS 1.2 to install the PowerShellGet or ExchangeOnlineManagement modules, run the following command in Windows PowerShell *before* you install the module:
To *permanently* enable strong cryptography in the Microsoft .NET Framework version 4.x or later, run one of the following commands based on your Windows architecture:
For more information, see [SchUseStrongCrypto](/dotnet/framework/network-programming/tls#schusestrongcrypto).
283
315
284
316
### Uninstall the EXO V2 module
285
317
286
-
To uninstall the module, run the following command **in an elevated PowerShell window**:
318
+
To uninstall the module, run **one** of the following commands based on how you originally installed the module (in an elevated PowerShell window vs. `Scope CurrentUser`):
287
319
288
-
```powershell
289
-
Uninstall-Module -Name ExchangeOnlineManagement
290
-
```
320
+
- In an elevated PowerShell window (all users):
321
+
322
+
```powershell
323
+
Uninstall-Module -Name ExchangeOnlineManagement
324
+
```
325
+
326
+
- Only for the current user account:
327
+
328
+
```powershell
329
+
Uninstall-Module -Name ExchangeOnlineManagement
330
+
```
291
331
292
332
For detailed syntax and parameter information, see [Uninstall-Module](https://docs.microsoft.com/powershell/module/powershellget/uninstall-module).
0 commit comments