Skip to content

Commit 0c55ad0

Browse files
authored
Merge pull request #28478 from miryb/patch-1
Update configure-exchange-server-for-hybrid-modern-authentication.md
2 parents 198c869 + f6a6548 commit 0c55ad0

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

microsoft-365/enterprise/configure-exchange-server-for-hybrid-modern-authentication.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -135,11 +135,11 @@ Run the commands that assign your on-premises web service URLs as Microsoft Entr
135135
5. If you don't see your internal and external MAPI/HTTP, EWS, ActiveSync, OAB, and Autodiscover records in this list, you must add them using the command below (the example URLs are `mail.corp.contoso.com` and `owa.contoso.com`, but you'd **replace the example URLs with your own**). Ensure that the generic AutoDiscover record for your domain (for example `autodiscover.contoso.com`) is included as well:
136136

137137
```powershell
138-
$x= Get-MsolServicePrincipal -AppPrincipalId 00000002-0000-0ff1-ce00-000000000000
139-
$x.ServicePrincipalnames.Add("https://mail.corp.contoso.com/")
140-
$x.ServicePrincipalnames.Add("https://owa.contoso.com/")
141-
$x.ServicePrincipalnames.Add("https://autodiscover.contoso.com/")
142-
Set-MSOLServicePrincipal -AppPrincipalId 00000002-0000-0ff1-ce00-000000000000 -ServicePrincipalNames $x.ServicePrincipalNames
138+
$x = Get-MgServicePrincipal -Filter "AppId eq '00000002-0000-0ff1-ce00-000000000000'"
139+
$x.ServicePrincipalNames += "https://mail.corp.contoso.com/"
140+
$x.ServicePrincipalNames += "https://owa.contoso.com/"
141+
$x.ServicePrincipalNames += "https://autodiscover.contoso.com/"
142+
Update-MgServicePrincipal -ServicePrincipalId $x.Id -ServicePrincipalNames $x.ServicePrincipalNames
143143
```
144144

145145
6. Verify that your new records were added by running the `Get-MgServicePrincipal` command from step 4 again, and validate the output. Compare the list from before to the new list of SPNs. You might also note down the new list for your records. If you're successful, you should see the two new URLs in the list. Going by our example, the list of SPNs now includes the specific URLs `https://mail.corp.contoso.com` and `https://owa.contoso.com`.

0 commit comments

Comments
 (0)