Skip to content

Commit 2740789

Browse files
author
dinabogdan
committed
2 parents 0b2d756 + ce4d848 commit 2740789

File tree

437 files changed

+7612
-1501
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

437 files changed

+7612
-1501
lines changed

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
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.
66

7-
![Contribution and Consumption model for Office PowerShell reference content](images/contrib-consumption-model.png)
7+
![Contribution and Consumption model for Office PowerShell reference content.](images/contrib-consumption-model.png)
88

99
## Learn How To Contribute
1010

@@ -19,19 +19,19 @@ Contributors who only make infrequent or small updates can edit the file directl
1919

2020
This brief video also covers how to contribute:
2121

22-
[![Image of Quick Start video](images/edit_video_capture.jpg)](https://support.office.com/article/edit-powershell-cmdlet-in-github-dcd20227-3764-48ce-ad6e-763af8b48daf)
22+
[![Image of Quick Start video.](images/edit_video_capture.jpg)](https://support.office.com/article/edit-powershell-cmdlet-in-github-dcd20227-3764-48ce-ad6e-763af8b48daf)
2323

2424
### Quickly update an article using GitHub.com
2525

2626
1. Make sure you're signed in to GitHub.com with your GitHub account.
2727
2. Go to the page you want to edit on docs.microsoft.com.
2828
3. On the right-hand side of the page, click **Edit** (pencil icon).
2929

30-
![Edit button on docs.microsoft.com](images/quick-update-edit.png)
30+
![Edit button on docs.microsoft.com.](images/quick-update-edit.png)
3131

3232
4. The corresponding topic file on GitHub opens, where you need to click the **Edit this file** pencil icon.
3333

34-
![Edit button on github.com](images/quick-update-github.png)
34+
![Edit button on github.com.](images/quick-update-github.png)
3535

3636
5. The topic opens in a line-numbered editing page where you can make changes to the file.
3737

@@ -45,7 +45,7 @@ This brief video also covers how to contribute:
4545

4646
- 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).
4747

48-
![Image of Automatic Fork message on Github](images/auto_fork.png)
48+
![Image of Automatic Fork message on Github.](images/auto_fork.png)
4949

5050
6. You can click the **Preview changes** tab to see what the changes will look like.
5151

@@ -56,15 +56,15 @@ This brief video also covers how to contribute:
5656

5757
When you're ready, click the green **Propose file change** button.
5858

59-
![Propose file change section](images/propose-file-change.png)
59+
![Propose file change section.](images/propose-file-change.png)
6060

6161
8. On the **Comparing changes** page that appears, click the green **Create pull request** button.
6262

63-
![Comparing changes page](images/comparing-changes-page.png)
63+
![Comparing changes page.](images/comparing-changes-page.png)
6464

6565
9. On the **Open a pull request** page that appears, click the green **Create pull request** button.
6666

67-
![Open a pull request page](images/open-a-pull-request-page.png)
67+
![Open a pull request page.](images/open-a-pull-request-page.png)
6868

6969
> [!NOTE]
7070
> 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.

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

Lines changed: 28 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ Because storing user credentials locally is not a safe practice, we're releasing
2828

2929
The following examples show how to use the Exchange Online PowerShell V2 module with app-only authentication:
3030

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+
3134
- Connect using a local certificate:
3235

3336
```powershell
@@ -51,10 +54,7 @@ The following examples show how to use the Exchange Online PowerShell V2 module
5154
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.
5255

5356
> [!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).
5858
5959
## How does it work?
6060

@@ -97,6 +97,9 @@ For a detailed visual flow about creating applications in Azure AD, see <https:/
9797
- Exchange administrator
9898
- Global Reader
9999

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+
100103
## Appendix
101104

102105
## 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:/
107110

108111
2. Under **Manage Azure Active Directory**, click **View**.
109112

110-
![Click View in the Azure AD portal under Manage Azure Active Directory](media/exo-app-only-auth-manage-ad-view.png)
113+
![Click View in the Azure AD portal under Manage Azure Active Directory.](media/exo-app-only-auth-manage-ad-view.png)
111114

112115
3. On the **Overview** page that opens, under **Manage**, select **App registrations**.
113116

114-
![Select App registrations](media/exo-app-only-auth-select-app-registrations.png)
117+
![Select App registrations.](media/exo-app-only-auth-select-app-registrations.png)
115118

116119
4. On the **App registrations** page that opens, click **New registration**.
117120

118-
![Select New registration on the App registrations page](media/exo-app-only-auth-new-app-registration.png)
121+
![Select New registration on the App registrations page.](media/exo-app-only-auth-new-app-registration.png)
119122

120123
On the **Register an application** page that opens, configure the following settings:
121124

@@ -127,7 +130,7 @@ For a detailed visual flow about creating applications in Azure AD, see <https:/
127130

128131
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.
129132

130-
![Register an application](media/exo-app-only-auth-register-app.png)
133+
![Register an application.](media/exo-app-only-auth-register-app.png)
131134

132135
When you're finished, click **Register**.
133136

@@ -140,7 +143,7 @@ For a detailed visual flow about creating applications in Azure AD, see <https:/
140143
141144
1. On the app page under **Management**, select **Manifest**.
142145

143-
![Select Manifest on the application properties page](media/exo-app-only-auth-select-manifest.png)
146+
![Select Manifest on the application properties page.](media/exo-app-only-auth-select-manifest.png)
144147

145148
2. On the **Manifest** page that opens, find the `requiredResourceAccess` entry (on or about line 44).
146149

@@ -164,33 +167,33 @@ For a detailed visual flow about creating applications in Azure AD, see <https:/
164167

165168
3. Still on the **Manifest** page, under **Management**, select **API permissions**.
166169

167-
![Select API permissions on the application properties page](media/exo-app-only-auth-select-api-permissions.png)
170+
![Select API permissions on the application properties page.](media/exo-app-only-auth-select-api-permissions.png)
168171

169172
On the **API permissions** page that opens, do the following steps:
170173

171174
- **API / Permissions name**: Verify the value **Exchange.ManageAsApp** is shown.
172175

173176
- **Status**: The current incorrect value is **Not granted for \<Organization\>**, and this value needs to be changed.
174177

175-
![Original incorrect API permissions](media/exo-app-only-auth-original-permissions.png)
178+
![Original incorrect API permissions.](media/exo-app-only-auth-original-permissions.png)
176179

177180
Select **Grant admin consent for \<Organization\>**, read the confirmation dialog that opens, and then click **Yes**.
178181

179182
The **Status** value should now be **Granted for \<Organization\>**.
180183

181-
![Admin consent granted](media/exo-app-only-auth-admin-consent-granted.png)
184+
![Admin consent granted.](media/exo-app-only-auth-admin-consent-granted.png)
182185

183186
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.
184187

185188
## Step 3: Generate a self-signed certificate
186189

187190
Create a self-signed x.509 certificate using one of the following methods:
188191

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:
190193

191194
```powershell
192195
# Create certificate
193-
$mycert = New-SelfSignedCertificate -DnsName "contoso.org" -CertStoreLocation "cert:\LocalMachine\My" -NotAfter (Get-Date).AddYears(1) -KeySpec KeyExchange
196+
$mycert = New-SelfSignedCertificate -DnsName "contoso.org" -CertStoreLocation "cert:\CurrentUser\My" -NotAfter (Get-Date).AddYears(1) -KeySpec KeyExchange
194197
195198
# Export certificate to .pfx file
196199
$mycert | Export-PfxCertificate -FilePath mycert.pfx -Password $(ConvertTo-SecureString -String "P@ssw0Rd1234" -AsPlainText -Force)
@@ -217,25 +220,25 @@ After you register the certificate with your application, you can use the privat
217220
2. Under **Manage Azure Active Directory**, click **View**.
218221
3. Under **Manage**, select **App registrations**.
219222

220-
![Apps registration page where you select your app](media/exo-app-only-auth-app-registration-page.png)
223+
![Apps registration page where you select your app.](media/exo-app-only-auth-app-registration-page.png)
221224

222225
2. On the application page that opens, under **Manage**, select **Certificates & secrets**.
223226

224-
![Select Certificates & Secrets on the application properties page](media/exo-app-only-auth-select-certificates-and-secrets.png)
227+
![Select Certificates & Secrets on the application properties page.](media/exo-app-only-auth-select-certificates-and-secrets.png)
225228

226229
3. On the **Certificates & secrets** page that opens, click **Upload certificate**.
227230

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

230233
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).
231234

232-
![Browse to the certificate and then click Add](media/exo-app-only-auth-upload-certificate-dialog.png)
235+
![Browse to the certificate and then click Add.](media/exo-app-only-auth-upload-certificate-dialog.png)
233236

234237
When you're finished, click **Add**.
235238

236239
The certificate is now shown in the **Certificates** section.
237240

238-
![Application page showing that the certificate was added](media/exo-app-only-auth-certificate-successfully-added.png)
241+
![Application page showing that the certificate was added.](media/exo-app-only-auth-certificate-successfully-added.png)
239242

240243
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.
241244

@@ -255,26 +258,26 @@ For general instructions about assigning roles in Azure AD, see [View and assign
255258

256259
1. On the Azure AD portal at <https://portal.azure.com/>, under **Manage Azure Active Directory**, click **View**.
257260

258-
![View in the Azure AD portal under Manage Azure Active Directory](media/exo-app-only-auth-manage-ad-view.png)
261+
![View in the Azure AD portal under Manage Azure Active Directory.](media/exo-app-only-auth-manage-ad-view.png)
259262

260263
2. On the **Overview** page that opens, under **Manage**, select **Roles and administrators**.
261264

262-
![Select Roles and administrators from the overview page](media/exo-app-only-auth-select-roles-and-administrators.png)
265+
![Select Roles and administrators from the overview page.](media/exo-app-only-auth-select-roles-and-administrators.png)
263266

264267
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.
265268

266-
![Find and select a supported role by clicking on the role name](media/exo-app-only-auth-find-and-select-supported-role.png)
269+
![Find and select a supported role by clicking on the role name.](media/exo-app-only-auth-find-and-select-supported-role.png)
267270

268271
4. On the **Assignments** page that opens, click **Add assignments**.
269272

270-
![Select Add assignments on the role assignments page](media/exo-app-only-auth-role-assignments-click-add-assignments.png)
273+
![Select Add assignments on the role assignments page.](media/exo-app-only-auth-role-assignments-click-add-assignments.png)
271274

272275
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).
273276

274-
![Find and select your app on the Add assignments flyout](media/exo-app-only-auth-find-add-select-app-for-assignment.png)
277+
![Find and select your app on the Add assignments flyout.](media/exo-app-only-auth-find-add-select-app-for-assignment.png)
275278

276279
When you're finished, click **Add**.
277280

278281
6. Back on the **Assignments** page, verify that the app has been assigned to the role.
279282

280-
![The role assignments page after to added the app to the role](media/exo-app-only-auth-app-assigned-to-role.png)
283+
![The role assignments page after to added the app to the role.](media/exo-app-only-auth-app-assigned-to-role.png)

0 commit comments

Comments
 (0)