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: README.md
+8-8Lines changed: 8 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@
4
4
5
5
This repository holds reference content of Office PowerShell cmdlets for help purpose. The expert knowledge around Office PowerShell is distributed among customers, MVPs, partners, product teams, support, and other community members. Consumers have various preferences when consuming knowledge such as a website, PowerShell Get-Help, Windows app, iOS app, Android app, and others. The following diagram illustrates the point.
6
6
7
-

7
+

8
8
9
9
## Learn How To Contribute
10
10
@@ -19,19 +19,19 @@ Contributors who only make infrequent or small updates can edit the file directl
19
19
20
20
This brief video also covers how to contribute:
21
21
22
-
[](https://support.office.com/article/edit-powershell-cmdlet-in-github-dcd20227-3764-48ce-ad6e-763af8b48daf)
22
+
[](https://support.office.com/article/edit-powershell-cmdlet-in-github-dcd20227-3764-48ce-ad6e-763af8b48daf)
23
23
24
24
### Quickly update an article using GitHub.com
25
25
26
26
1. Make sure you're signed in to GitHub.com with your GitHub account.
27
27
2. Go to the page you want to edit on docs.microsoft.com.
28
28
3. On the right-hand side of the page, click **Edit** (pencil icon).
29
29
30
-

30
+

31
31
32
32
4. The corresponding topic file on GitHub opens, where you need to click the **Edit this file** pencil icon.
33
33
34
-

34
+

35
35
36
36
5. The topic opens in a line-numbered editing page where you can make changes to the file.
37
37
@@ -45,7 +45,7 @@ This brief video also covers how to contribute:
45
45
46
46
- Since you are likely not a maintainer of the Git repository, GitHub will automatically 'Fork' the project into your personal GitHub account. A fork is a copy of the repository in your git account. By forking, you can freely make edits without affecting the original repository. You can always find it again by looking at your GitHub Repositories in your GitHub Profile (drop-down from your name in the top right).
47
47
48
-

48
+

49
49
50
50
6. You can click the **Preview changes** tab to see what the changes will look like.
51
51
@@ -56,15 +56,15 @@ This brief video also covers how to contribute:
56
56
57
57
When you're ready, click the green **Propose file change** button.
9. On the **Open a pull request** page that appears, click the green **Create pull request** button.
66
66
67
-

67
+

68
68
69
69
> [!NOTE]
70
70
> Your permissions in the repo determine what you see in the last several steps. People with no special privileges will see the **Propose file change** section and subsequent confirmation pages as described. People with permissions to create and approve their own pull requests will see a similar **Commit changes** section with extra options for creating a new branch and fewer confirmation pages.<br/><br/>The point is: click any green buttons that are presented to you until there are no more.
Copy file name to clipboardExpand all lines: exchange/docs-conceptual/app-only-auth-powershell-v2.md
+28-25Lines changed: 28 additions & 25 deletions
Original file line number
Diff line number
Diff line change
@@ -28,6 +28,9 @@ Because storing user credentials locally is not a safe practice, we're releasing
28
28
29
29
The following examples show how to use the Exchange Online PowerShell V2 module with app-only authentication:
30
30
31
+
> [!IMPORTANT]
32
+
> 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.
33
+
31
34
- Connect using a local certificate:
32
35
33
36
```powershell
@@ -51,10 +54,7 @@ The following examples show how to use the Exchange Online PowerShell V2 module
51
54
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.
52
55
53
56
> [!TIP]
54
-
>
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
-
>
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).
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
@@ -97,6 +97,9 @@ For a detailed visual flow about creating applications in Azure AD, see <https:/
97
97
- Exchange administrator
98
98
- Global Reader
99
99
100
+
> [!NOTE]
101
+
> The Global administrator and Exchange administrator roles provide the necessary permissions for any Exchange-related tasks, including recipient management and protection features (anti-spam, anti-malware, etc). The Security administrator role doesn't not have the necessary permissions for these same Exchange-related tasks.
102
+
100
103
## Appendix
101
104
102
105
## Step 1: Register the application in Azure AD
@@ -107,15 +110,15 @@ For a detailed visual flow about creating applications in Azure AD, see <https:/
107
110
108
111
2. Under **Manage Azure Active Directory**, click **View**.
109
112
110
-

113
+

111
114
112
115
3. On the **Overview** page that opens, under **Manage**, select **App registrations**.
4. On the **App registrations** page that opens, click **New registration**.
117
120
118
-

121
+

119
122
120
123
On the **Register an application** page that opens, configure the following settings:
121
124
@@ -127,7 +130,7 @@ For a detailed visual flow about creating applications in Azure AD, see <https:/
127
130
128
131
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
132
130
-

133
+

131
134
132
135
When you're finished, click **Register**.
133
136
@@ -140,7 +143,7 @@ For a detailed visual flow about creating applications in Azure AD, see <https:/
140
143
141
144
1. On the app page under **Management**, select **Manifest**.
142
145
143
-

146
+

144
147
145
148
2. On the **Manifest** page that opens, find the `requiredResourceAccess` entry (on or about line 44).
146
149
@@ -164,33 +167,33 @@ For a detailed visual flow about creating applications in Azure AD, see <https:/
164
167
165
168
3. Still on the **Manifest** page, under **Management**, select **API permissions**.
166
169
167
-

170
+

168
171
169
172
On the **API permissions** page that opens, do the following steps:
170
173
171
174
-**API / Permissions name**: Verify the value **Exchange.ManageAsApp** is shown.
172
175
173
176
-**Status**: The current incorrect value is **Not granted for \<Organization\>**, and this value needs to be changed.
174
177
175
-

178
+

176
179
177
180
Select **Grant admin consent for \<Organization\>**, read the confirmation dialog that opens, and then click **Yes**.
178
181
179
182
The **Status** value should now be **Granted for \<Organization\>**.
4. Close the current **API permissions** page (not the browser tab) to return to the **App registrations** page. You'll use it in an upcoming step.
184
187
185
188
## Step 3: Generate a self-signed certificate
186
189
187
190
Create a self-signed x.509 certificate using one of the following methods:
188
191
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:
192
+
- (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:
@@ -217,25 +220,25 @@ After you register the certificate with your application, you can use the privat
217
220
2. Under **Manage Azure Active Directory**, click **View**.
218
221
3. Under **Manage**, select **App registrations**.
219
222
220
-

223
+

221
224
222
225
2. On the application page that opens, under **Manage**, select **Certificates & secrets**.
223
226
224
-

227
+

225
228
226
229
3. On the **Certificates & secrets** page that opens, click **Upload certificate**.
227
230
228
-

231
+

229
232
230
233
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).
231
234
232
-

235
+

233
236
234
237
When you're finished, click **Add**.
235
238
236
239
The certificate is now shown in the **Certificates** section.
237
240
238
-

241
+

239
242
240
243
4. Close the current **Certificates & secrets** page, and then the **App registrations** page to return to the main <https://portal.azure.com/> page. You'll use it in the next step.
241
244
@@ -255,26 +258,26 @@ For general instructions about assigning roles in Azure AD, see [View and assign
255
258
256
259
1. On the Azure AD portal at <https://portal.azure.com/>, under **Manage Azure Active Directory**, click **View**.
257
260
258
-

261
+

259
262
260
263
2. On the **Overview** page that opens, under **Manage**, select **Roles and administrators**.
261
264
262
-

265
+

263
266
264
267
3. On the **Roles and administrators** page that opens, find and select one of the supported roles by _clicking on the name of the role_ (not the check box) in the results.
265
268
266
-

269
+

267
270
268
271
4. On the **Assignments** page that opens, click **Add assignments**.
269
272
270
-

273
+

271
274
272
275
5. In the **Add assignments** flyout that opens, find and select the app that you created in [Step 1](#step-1-register-the-application-in-azure-ad).
273
276
274
-

277
+

275
278
276
279
When you're finished, click **Add**.
277
280
278
281
6. Back on the **Assignments** page, verify that the app has been assigned to the role.
279
282
280
-

283
+

0 commit comments