Skip to content

Commit f58baed

Browse files
authored
Merge pull request #401 from v-mathavale/v-mathavale-9713814
as per 9713814
2 parents 71aa4a5 + 96da55c commit f58baed

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

docs/legacy-protocols/how-to-authenticate-an-imap-pop-smtp-application-by-using-oauth.md

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,8 @@ Service principals in Exchange are used to enable applications to access Exchang
189189

190190
4. Click **Application permissions**.
191191

192-
5. For POP access, choose the **POP.AccessAsApp** permission. For IMAP access, choose the **IMAP.AccessAsApp** permission. For SMTP access, choose the **SMTP.SendAsApp** permission.
192+
5. For POP access, choose the **POP.AccessAsApp** permission. For IMAP access, choose the **IMAP.AccessAsApp** permission. For SMTP access, choose the **SMTP.SendAsApp** permission.<br>
193+
The following screenshot shows the permissions selected:
193194

194195
![pop-imap-permission](media/pop-imap-smtp-permission.png)
195196

@@ -226,7 +227,9 @@ https://login.microsoftonline.com/{tenant}/v2.0/adminconsent?client_id=<CLIENT_I
226227

227228
If you registered your application in your own tenant using "Accounts in this organizational directory only", you can go forward and use the application configuration page within the Microsoft Entra admin center to grant the admin consent, and you don´t have to use the authorization request URL approach.
228229

229-
![granting-consent-for-tenant](media/grant-consent.png)
230+
The following screenshot shows how to grant admin consent using the application configuration page within the Microsoft Entra admin center.
231+
232+
:::image type="content" source="media/grant-consent.png" alt-text="Screenshot of how to grant admin consent." lightbox="media/grant-consent.png":::
230233

231234
### Register service principals in Exchange
232235

@@ -235,7 +238,7 @@ Once a tenant admin consents your Microsoft Entra application, they must registe
235238
To use the *New-ServicePrincipal* cmdlet, install ExchangeOnlineManagement and connect to your tenant as shown in the following snippet:
236239

237240
```text
238-
Install-Module -Name ExchangeOnlineManagement -allowprerelease
241+
Install-Module -Name ExchangeOnlineManagement
239242
Import-module ExchangeOnlineManagement
240243
Connect-ExchangeOnline -Organization <tenantId>
241244
```
@@ -258,6 +261,10 @@ Get-ServicePrincipal | fl
258261

259262
The OBJECT_ID is the Object ID from the Overview page of the Enterprise Application node (Azure Portal) for the application registration. It is **not** the Object ID from the Overview page of the App Registrations node. Using the incorrect Object ID will cause an authentication failure.
260263

264+
The following screenshot shows an example that finds the correct Object ID, which begins with '6d':
265+
266+
:::image type="content" source="media/object-id.png" alt-text="Screenshot of example of finding the correct object id." lightbox="media/object-id.png":::
267+
261268
The tenant admin can now add the specific mailboxes in the tenant that will be allowed to be accessed by your application. This configuration is done with the [`Add-MailboxPermission` cmdlet](/powershell/module/exchange/add-mailboxpermission).
262269

263270
The following example shows how to give your application's service principal access to one mailbox:
@@ -267,7 +274,10 @@ Add-MailboxPermission -Identity "[email protected]" -User
267274
<SERVICE_PRINCIPAL_ID> -AccessRights FullAccess
268275
```
269276

270-
Different IDs are used during creation of the Exchange service principal and also later when granting mailbox permissions. The following example may help you to use the correct ID for the different stages. This example uses Microsoft Entra cmdlets; so, you'll need to install the Microsoft Entra PowerShell module, if you haven't already. For more information, see [Install Microsoft Entra PowerShell for Graph](/powershell/azure/active-directory/install-adv2?view=azureadps-2.0#installing-the-azure-ad-module&preserve-view=true).
277+
Different IDs are used during creation of the Exchange service principal and also later when granting mailbox permissions.
278+
279+
**Optional example:**<br>
280+
The following example may help you to use the correct ID for the different stages. This example uses Microsoft Entra cmdlets; so, you'll need to install the Microsoft Entra PowerShell module, if you haven't already. For more information, see [Install Microsoft Entra PowerShell for Graph](/powershell/azure/active-directory/install-adv2?view=azureadps-2.0#installing-the-azure-ad-module&preserve-view=true).
271281

272282
```text
273283
$AADServicePrincipalDetails = Get-AzureADServicePrincipal -SearchString YourAppName
83.3 KB
Loading

0 commit comments

Comments
 (0)