Bemærk
Adgang til denne side kræver godkendelse. Du kan prøve at logge på eller ændre mapper.
Adgang til denne side kræver godkendelse. Du kan prøve at ændre mapper.
Overview
Exchange hybrid features like Free/Busy, MailTips, and Photos require a dedicated application in Entra ID for secure communication between Exchange Server and Exchange Online. This article explains how to create, configure, and manage the dedicated Exchange hybrid application.
Important
As of October 31, 2025, EWS access through the shared service principal is permanently blocked. Rich coexistence hybrid features (Free/Busy, MailTips, and profile picture sharing) no longer work through the legacy shared service principal workflow. All Exchange servers must run a supported build and use the dedicated Exchange hybrid application for these features to function. For more information, see the Dedicated Hybrid App: temporary enforcements, new HCW and possible hybrid functionality disruptions blog post.
Background: Why this change was made
Previously, Exchange Server used a shared Service Principal with Exchange Online for secure communication, and the Hybrid Configuration wizard (HCW) uploaded the current Auth Certificate to the shared Service Principal to enable this process. Because of the retirement of Exchange Web Services in Exchange Online and the removal of EWS dependencies from first-party apps and services, Exchange Server now uses a dedicated application in Entra ID for hybrid scenarios instead of the shared Service Principal.
This dedicated application is used exclusively by Exchange Server for hybrid communication and has no dependencies on the shared Service Principal. By default, it's configured with EWS API permissions. Starting with the May 2026 Hotfix Update, Graph API permissions can also be configured as a replacement for EWS API permissions in most hybrid scenarios. For details, see Configure Graph API permissions.
To learn more about this change and its implications, read the Exchange Server Security Changes for Hybrid Deployments blog post.
If you've already configured the dedicated Exchange hybrid app or previously had a hybrid configuration, we strongly recommend running the script in Service Principal Clean-Up Mode to remove any certificates that were uploaded to the first-party Service Principal's keyCredentials and not cleaned up.
Before you begin
Before you configure the dedicated Exchange hybrid application, you must first set up either Classic Full or Modern Full hybrid by using the Hybrid Configuration wizard.
Supported Exchange Server versions
The following Exchange Server builds support the dedicated Exchange hybrid application:
| Version | Build Number | EWS API workflow supported | Graph API workflow supported |
|---|---|---|---|
| Exchange Server SE RTM with May 2026 HU | 15.2.2562.41 | Yes | Yes |
| Exchange Server SE RTM | 15.2.2562.17 | Yes | No |
| Exchange Server 2019 CU15 with April 2025 HU | 15.2.1748.24 | Yes | No |
| Exchange Server 2019 CU14 with April 2025 HU | 15.2.1544.25 | Yes | No |
| Exchange Server 2016 CU23 with April 2025 HU | 15.1.2507.55 | Yes | No |
Required permissions
The following table summarizes the permissions required for each task:
| Task | Least privileged roles | Higher privileged role |
|---|---|---|
| Create the application in Entra ID | Application Administrator |
Global Administrator |
| Configure Auth Server and enable feature in Exchange | View-Only Configuration and Organization Client Access and Organization Configuration |
Organization Management |
| Clean up the shared service principal | — | Global Administrator |
For more details about Entra ID roles, see the Microsoft Entra built-in roles documentation. For Exchange Server roles, see the Organization Management documentation.
Run the script on a server with the Mailbox role installed and a build that supports this feature to configure the Auth Server and create the Setting Override.
Network connectivity requirements
The script uses the Microsoft Graph API to create and manage applications in Entra ID. The system running the script requires outbound connectivity to Graph API and Entra ID endpoints.
- In All-in-one Configuration Mode, the Exchange server running the script needs this outbound connectivity.
- In Split Execution Configuration Mode, the system used to create or manage the application in Entra ID needs this outbound connectivity (this system doesn't have to be an Exchange server).
Choose the endpoint that matches where your tenant resides, such as Global. For more information, see the National Microsoft Entra ID Endpoints and National Microsoft Graph Endpoints documentation.
To verify connectivity to the Graph and Entra ID endpoints, use the Test-NetConnection cmdlet. This example validates the connection using the Global endpoints:
Test-NetConnection -ComputerName login.microsoftonline.com -Port 443
Test-NetConnection -ComputerName graph.microsoft.com -Port 443
If you plan to use the Graph API-based hybrid flow, ensure that your Exchange servers have outbound connectivity to the Graph API endpoint.
Configure the dedicated Exchange hybrid application
Microsoft provides the ConfigureExchangeHybridApplication.ps1 script to configure the dedicated Exchange hybrid application. Detailed documentation for the script and its parameters is available in the ConfigureExchangeHybridApplication.ps1 script documentation.
Choose the configuration path that matches your environment:
| Your scenario | Configuration path |
|---|---|
| Mailbox server has internet access and you have Entra ID permissions | All-in-one mode (recommended) |
| Mailbox server lacks internet access or you need to separate Entra ID and Exchange tasks | Split execution mode |
| You already used HCW to create the app | Enable the feature after using HCW. To add Graph API permissions, run the script after HCW completes. |
If your on-premises organization has hybrid relationships with multiple tenants (1:N), run the script once for each tenant using an account from that tenant. If you plan to switch to the Graph API-based workflow, prepare the dedicated Exchange hybrid application in each tenant before you enable the Graph API-based workflow via the Setting Override. Enabling the workflow before the Graph API permissions are granted and consented in each tenant causes hybrid features to stop working for tenants without the properly configured Graph API permissions.
Depending on the size of your organization, it might take up to 60 minutes for the dedicated Exchange hybrid application configuration to be recognized by the responsible Exchange Server processes. During this time, features such as Free/Busy, MailTips, and Photos might be temporarily unavailable.
The latest version of the Hybrid Configuration wizard (HCW) also supports configuring the dedicated Exchange Hybrid application with EWS API permissions. However, HCW doesn't enable the feature automatically. If you used HCW, follow the steps in Enable the feature after using HCW to activate it. HCW also doesn't automatically clean up certificates previously uploaded to the first-party service principal's keyCredentials. To perform this clean-up and mitigate CVE-2025-53786, run the script in Service Principal Clean-Up Mode.
All-in-one configuration mode
For most customers, the All-in-one Configuration Mode is the recommended way to configure this feature. Run the script on a Mailbox server with outbound connectivity as described in the Network connectivity requirements section. The server must run an Exchange Server build that supports this feature.
Important
The All-in-one Configuration Mode isn't compatible with Windows Server Core. If you're using Windows Server Core, follow the instructions in the Split execution configuration mode section.
Run the following command:
.\ConfigureExchangeHybridApplication.ps1 -FullyConfigureExchangeHybridApplication
By default, the script runs against the Microsoft 365 Worldwide cloud. If your Microsoft 365 tenant is in a different cloud, use the AzureEnvironment parameter. In the following example, the application is created in the Microsoft 365 operated by 21Vianet cloud:
.\ConfigureExchangeHybridApplication.ps1 -FullyConfigureExchangeHybridApplication -AzureEnvironment "ChinaCloud"
The script performs all the necessary steps: creating the application in Entra ID, configuring the Auth Server, and enabling the feature via Setting Override. During execution, the script asks whether you want to configure Graph API permissions in addition to the EWS API permissions. If you choose to configure Graph API permissions, the script also enables the Graph API-based hybrid flow via a Setting Override after an additional confirmation.
If you want to create the dedicated Exchange hybrid application without EWS API permissions, use the UseGraphApiOnly parameter:
.\ConfigureExchangeHybridApplication.ps1 -FullyConfigureExchangeHybridApplication -UseGraphApiOnly
Split execution configuration mode
Use this mode if your Mailbox server doesn't have outbound connectivity to Microsoft Graph or Entra ID, or if the Exchange Server administrator doesn't have sufficient permissions to create and configure the application in Entra ID.
If you perform any of the steps on a non-Exchange Server, ensure that the computer is joined to the same forest where your Exchange organization resides.
Step 1: Export the Auth Certificate
Export the Auth Certificate (and, if available, the next Auth Certificate) with its public key. Don't export the private key of the certificate. Run the following script from an elevated Exchange Management Shell (EMS):
In this example, the certificate is exported to C:\AuthCertExport. To export to a different location, modify the $exportFilePath variable.
# Change the path if you want to export the certificates to a different location
$exportFilePath = "C:\AuthCertExport"
$authConfig = Get-AuthConfig
New-Item -Type Directory -Path C:\AuthCertExport -Force | Out-Null
if (-not([System.String]::IsNullOrEmpty($authConfig.CurrentCertificateThumbprint))) {
$thumbprint = $authConfig.CurrentCertificateThumbprint
Write-Host "[+] Auth Certificate thumbprint: $thumbprint"
try {
$currentAuthCertificate = Get-ChildItem -Path Cert:\LocalMachine\My\$thumbprint
Export-Certificate -Cert $currentAuthCertificate -FilePath "$exportFilePath\$thumbprint.cer" -Type CERT | Out-Null
Write-Host "[+] Certificate was successfully exported to: $exportFilePath"
} catch {
Write-Host "[+] We hit the following exception: $_" -ForegroundColor Red
}
}
if (-not([System.String]::IsNullOrEmpty($authConfig.NextCertificateThumbprint))) {
$thumbprint = $authConfig.NextCertificateThumbprint
Write-Host "[+] Next Auth Certificate thumbprint: $thumbprint"
try {
$currentAuthCertificate = Get-ChildItem -Path Cert:\LocalMachine\My\$thumbprint
Export-Certificate -Cert $currentAuthCertificate -FilePath "$exportFilePath\$thumbprint.cer" -Type CERT | Out-Null
Write-Host "[+] Certificate was successfully exported to: $exportFilePath"
} catch {
Write-Host "[+] We hit the following exception: $_" -ForegroundColor Red
}
}
Step 2: Create the application in Entra ID
Copy the exported certificates to a machine with outbound connectivity as described in the Network connectivity requirements section. Run the script on that machine to create the application in Entra ID. The script displays your Tenant ID and the appId of the newly created application. Note both values because you need them in a later step.
.\ConfigureExchangeHybridApplication.ps1 -CreateApplication -UpdateCertificate -CertificateMethod "File" -CertificateInformation "C:\Certificates\CurrentAuthCertificate.cer"
To configure the application with Graph API permissions only, use the UseGraphApiOnly parameter:
.\ConfigureExchangeHybridApplication.ps1 -CreateApplication -UseGraphApiOnly -UpdateCertificate -CertificateMethod "File" -CertificateInformation "C:\Certificates\CurrentAuthCertificate.cer"
If multiple Auth Certificates were exported in step 1, run the script again to upload the additional certificate. The CreateApplication step isn't required for the second run:
.\ConfigureExchangeHybridApplication.ps1 -UpdateCertificate -CertificateMethod "File" -CertificateInformation "C:\Certificates\NewNextAuthCertificate.cer"
Step 3: Configure Exchange Server
Run this step on a Mailbox server. The script configures the Auth Server, updates existing organization relationships between Exchange Server and Exchange Online, and enables the dedicated Exchange hybrid application feature. Provide the ID of your tenant, the appId of the newly created application in Entra ID, and the remote routing domain:
.\ConfigureExchangeHybridApplication.ps1 -ConfigureAuthServer -ConfigureTargetSharingEpr -EnableExchangeHybridApplicationOverride -CustomAppId "<appId>" -TenantId "<tenantId>" -RemoteRoutingDomain "<organization>.mail.onmicrosoft.com"
Enable the feature after using HCW
If you used the Hybrid Configuration wizard (HCW) to configure the dedicated Exchange Hybrid application, you must run the New-SettingOverride cmdlet to enable the feature for your on-premises Exchange Server organization. Execute the following command from an elevated Exchange Management Shell (EMS):
New-SettingOverride -Name "EnableExchangeHybrid3PAppFeature" -Component "Global" -Section "ExchangeOnpremAsThirdPartyAppId" -Parameters @("Enabled=true") -Reason "Enable dedicated Exchange hybrid app feature"
Get-ExchangeDiagnosticInfo -Process Microsoft.Exchange.Directory.TopologyService -Component VariantConfiguration -Argument Refresh
Configure Graph API permissions
Starting with the May 2026 Hotfix Update, Exchange Server supports the Graph API-based hybrid flow for most scenarios. Microsoft has updated the ConfigureExchangeHybridApplication.ps1 script to configure Graph API permissions on newly created and existing applications and to enable the Graph API-based hybrid flow via a Setting Override.
Microsoft is rolling out support for the Graph API-based hybrid flow across clouds in phases. The following table lists the current availability. This article is updated as support expands to additional clouds.
| Cloud | Graph API-based hybrid flow supported |
|---|---|
| Microsoft 365 Global | Yes |
| Microsoft 365 operated by 21Vianet | No |
| Microsoft 365 US Government L4 (GCC High) | No |
| Microsoft 365 US Government L5 (DOD) | No |
| Bleu | No |
| Delos Cloud | No |
Important
Don't enable the Graph API-based hybrid flow in a cloud where it isn't yet supported. Enabling it before support is available causes hybrid features such as Free/Busy, MailTips, and profile picture sharing to stop working.
Supported scenarios
The following table shows which hybrid features each API supports:
| Feature | Supported via EWS API | Supported via Graph API |
|---|---|---|
| Free/Busy | Yes | Yes |
| MailTips | Yes | Partial (Automatic Replies only) |
| Profile Pictures | Yes | Yes |
| Move to Archive (Archive Mailbox in cloud) |
Yes | No |
Important
After you enabled the Graph API-based hybrid flow, Exchange Server uses EWS for hybrid features which aren't yet supported with Graph API. Don't remove the EWS API permissions from the application in Entra ID if you rely on any scenario that isn't yet supported with Graph API. If you don't use the features that aren't yet supported with Graph API, you can remove the full_access_as_app EWS API permission by using the script in Remove API permissions mode.
Microsoft is actively working to expand Graph API support for additional scenarios. This documentation is updated as new scenarios become supported. Exchange Server continues to use EWS for any scenario that isn't yet supported with Graph API, even if the Graph API-based hybrid flow is enabled.
Enable Graph API-based hybrid flow
During All-in-one Configuration Mode, the script prompts you to configure Graph API permissions. If you already configured the application and want to add Graph API permissions later, rerun the script:
.\ConfigureExchangeHybridApplication.ps1 -FullyConfigureExchangeHybridApplication
For split execution mode, use the UseGraphApiOnly parameter as described in Split execution configuration mode.
Remove EWS API permissions
If you don't use any features that require EWS API and want to use only Graph API permissions, run the script to remove the full_access_as_app EWS API permission:
.\ConfigureExchangeHybridApplication.ps1 -RemoveApiPermissions "EWS"
This command can be executed on a non-Exchange server.
Verify the configuration
To confirm that OAuth authentication works correctly between Exchange Server and Exchange Online, use the Test-OAuthConnectivity cmdlet from Exchange Management Shell on your on-premises Exchange Server.
If the ResultType is Success and the Detail section includes the appId of your dedicated Exchange hybrid application, Exchange Server successfully acquired an OAuth token. The OAuth request is initiated by the server where the Exchange Management Shell (EMS) session is running. If the mailbox specified via the -Mailbox parameter resides on a different server that doesn't support the dedicated Exchange hybrid app, but the EMS host server does, the ResultType still shows Success. This behavior is by design.
Run the following command (replace the email address with an on-premises mailbox in your environment):
$OnPremisesMailbox = "userMailboxOnprem@contoso.com"
$result = Test-OAuthConnectivity -Service EWS -TargetUri https://outlook.office365.com -Mailbox $OnPremisesMailbox
Write-Host $result.ResultType
if (($result.Detail.FullId) -match 'L:(?<guid>[0-9a-fA-F-]{36})-AS:') {
$appid = $matches['guid']
Write-Output "Extracted appId: $appid"
} else {
Write-Output "appId not found"
}
Manage the application
This section covers common management tasks for the dedicated Exchange hybrid application after initial configuration.
Update the Auth Certificate
Use the following steps when the Auth Certificate expires or is replaced. These steps aren't required during initial configuration. For more information about maintaining the Auth Certificate, see the Maintain the Exchange Server OAuth certificate documentation.
If your Mailbox server has outbound connectivity as described in the Network connectivity requirements section, run:
.\ConfigureExchangeHybridApplication.ps1 -UpdateCertificate
If your Mailbox server doesn't have outbound connectivity, export the new Auth Certificate by following the steps in Step 1: Export the Auth Certificate. Copy the certificate to a machine with outbound connectivity, then run:
.\ConfigureExchangeHybridApplication.ps1 -UpdateCertificate -CertificateMethod "File" -CertificateInformation "C:\Certificates\NewAuthCertificate.cer"
Tip
Use the MonitorExchangeAuthCertificate script to validate your OAuth certificate. If you need to update your OAuth certificate, follow the steps in the Maintain the Exchange Server OAuth certificate documentation.
Clean up the shared service principal
After you enable the dedicated Exchange hybrid application feature and all your Exchange servers run an Exchange build that supports this feature, clean up the certificates that were previously uploaded to the first-party Service Principal. As part of the previous Exchange hybrid design, the HCW uploaded the Auth Certificate to the first-party Service Principal. This practice is no longer recommended and shouldn't be performed. The Auth Certificate must now be uploaded exclusively to the dedicated Exchange hybrid application.
The commands in this section can be executed on any computer with outbound internet connectivity. Exchange servers running builds older than those listed in the Supported Exchange Server versions section can't use rich coexistence hybrid features regardless of whether certificates exist on the shared service principal, because EWS access through the shared service principal has been permanently blocked since October 31, 2025. Update these servers to a supported build and configure the dedicated Exchange hybrid application to restore hybrid functionality.
Warning
If you run the HCW after configuring the dedicated Exchange hybrid application feature and select the Oauth, Intra Organization Connector and Organization Relationship configuration option, the Auth Certificate is uploaded to the first-party Service Principal again. It's strongly recommended to repeat the steps to purge the Auth Certificate from the first-party Service Principal in this case.
To purge all keyCredentials of the first-party Service Principal, run:
.\ConfigureExchangeHybridApplication.ps1 -ResetFirstPartyServicePrincipalKeyCredentials
To purge a specific certificate and all expired certificates from the keyCredentials, provide the thumbprint of the certificate to delete:
.\ConfigureExchangeHybridApplication.ps1 -ResetFirstPartyServicePrincipalKeyCredentials -CertificateInformation "1234567890ABCDEF1234567890ABCDEF12345678"
Remove API permissions
To remove specific API permissions from the dedicated Exchange hybrid application in Entra ID, use the RemoveApiPermissions parameter. This command can be executed on a non-Exchange server. Supported values for the RemoveApiPermissions parameter are EWS and Graph. The EWS value removes the full_access_as_app permission, while the Graph value removes the Graph API permissions.
To remove the full_access_as_app EWS API permission, run:
.\ConfigureExchangeHybridApplication.ps1 -RemoveApiPermissions "EWS"
Delete the application
If needed, use the following command to delete the application created in Entra ID. This command can be executed on a non-Exchange server. Use this command only when rolling back the change or troubleshooting the creation of a new application. Deleting the application via the script doesn't revert the Exchange hybrid application configuration in your environment. To fully revert, follow the steps in Roll back the dedicated Exchange hybrid application configuration.
.\ConfigureExchangeHybridApplication.ps1 -DeleteApplication
Monitor and secure the application
Audit application usage in Entra ID
After you configure the dedicated Exchange hybrid application and enable the feature, audit its usage through the Entra ID Sign-in logs:
- Navigate to the Entra ID portal and sign in with your credentials.
- Select or search for Microsoft Entra ID.
- In the navigation pane, go to Monitoring and select Sign-in logs.
- Select Service principal sign-ins to view detailed logs.
The following picture shows a successful sign-in request:
When you select the entry, the Activity Details: Sign-ins flyout opens, providing more information about the sign-in activity:
Restrict access with Conditional Access
Some organizations might want to restrict access to the dedicated Exchange hybrid application service principal to a subset of public IP ranges used by Exchange Server. Use Conditional Access for workload identities to achieve this. This feature extends Conditional Access policy support to service principals owned by the organization. Workload Identities Premium licenses are required to create or modify Conditional Access policies scoped to service principals. For more information, see Microsoft Entra Workload ID.
Roll back the dedicated Exchange hybrid application configuration
Warning
Since October 31, 2025, EWS access through the shared service principal is permanently blocked. Rolling back to the shared service principal doesn't restore rich coexistence hybrid features (Free/Busy, MailTips, and profile picture sharing). Only use these rollback steps if you need to revert the on-premises configuration changes for troubleshooting purposes or if you plan to reconfigure the dedicated Exchange hybrid application from scratch.
The following steps revert the configuration applied by the ConfigureExchangeHybridApplication.ps1 script.
Step 1: Reconfigure the first-party Service Principal
Run HCW and select the Oauth, Intra Organization Connector and Organization Relationship option to reconfigure the first-party Service Principal.
Step 2: Remove the Setting Override
Remove the Setting Override that enables the dedicated Exchange hybrid application feature. Run the following command from an elevated Exchange Management Shell (EMS):
Get-SettingOverride | Where-Object {$_.ComponentName -eq "Global" -and $_.SectionName -eq "ExchangeOnpremAsThirdPartyAppId"} | Remove-SettingOverride
Get-ExchangeDiagnosticInfo -Process Microsoft.Exchange.Directory.TopologyService -Component VariantConfiguration -Argument Refresh
Step 3: Revert the Auth Server configuration
Run the following command from an elevated Exchange Management Shell (EMS) to revert the Auth Server change:
# Replace this id with the id of your tenant
$tenantId = "123e4567-e89b-12d3-a456-426614174000"
(Get-AuthServer | Where-Object {$_.Name -like "*evoSTS*" -and $_.Realm -eq $tenantId}) | Set-AuthServer -ApplicationIdentifier $null -DomainName $null
Step 4: Delete the application in Entra ID
Use the script to delete the application that was created in Entra ID:
.\ConfigureExchangeHybridApplication.ps1 -DeleteApplication
Next steps
After you configure the dedicated Exchange hybrid application, consider the following:
- Maintain the Exchange Server OAuth certificate to ensure uninterrupted hybrid functionality when certificates expire or rotate.
- Configure Graph API permissions to transition hybrid features from EWS to Graph API.
- Monitor and secure the application by auditing sign-in activity and restricting access with Conditional Access policies.
- Clean up the shared service principal to remove legacy certificates and harden your hybrid configuration.
Reference: Script operations
The ConfigureExchangeHybridApplication.ps1 script performs various operations based on the selected option. The following section provides a detailed reference of the specific operations executed by the script for each mode.
CreateApplication
- Create a new application with name
ExchangeServerApp-{Guid of the organization}in Entra ID - Assign the user who was used to run the script as an owner of the application in Entra ID
- Assign the
full_access_as_appEWS API permissions (used in EWS-based hybrid flow) - (Optional) Assign the
MailboxSettings.Read,MailTips.ReadBasic.All,Calendars.Read,ProfilePhoto.Read.AllGraph API permissions (used in Graph API-based hybrid flow) - Grant tenant-wide admin consent
- This change needs to be confirmed during the runtime of the script
- The script doesn't enable the feature via Setting Override if tenant-wide admin consent isn't granted
UpdateCertificate
- Upload the current Auth Certificate to the application in Entra ID
- Upload the new next Auth Certificate (if it exists) to the application in Entra ID
- Delete any certificate from the application that has expired
ConfigureAuthServer
- Update the
EvoSTSorEvoSTS - {Guid}Auth Server object- Set the
ApplicationIdentifierto theappIdof the application in Entra ID - Set the
GraphBaseUrlto the Graph API endpoint corresponding to the cloud where the application is created (for example,https://graph.microsoft.comforGlobalcloud) - Add the SMTP Remote Routing Domain to the
DomainNameproperty
- Set the
ConfigureTargetSharingEpr
- Identify any enabled
OrganizationRelationshipconfigured between Exchange Server and Exchange Online - Use AutoDiscover to query the
Exchange Web Services (EWS)endpoint - Set the
TargetSharingEprto the EWS endpoint returned by AutoDiscover
EnableExchangeHybridApplicationOverride
- If the script runs in All-in-one configuration mode:
- Validate that the application in Entra ID has the correct API permissions and tenant-wide admin consent granted
- Create a new Setting Override to enable the feature on-premises by using the following parameters and values:
- Name:
EnableExchangeHybrid3PAppFeature - Component:
Global - Section:
ExchangeOnpremAsThirdPartyAppId - Parameters:
Enabled=true - Reason:
"Created by {Name of the Script} on {timestamp}"
- Name:
- (Optional) Create a new Setting Override to enable the use of Graph API for hybrid features by using the following parameters and values:
- Name:
EnableRouteThroughMSGraphFeature - Component:
SettingOverride - Section:
RouteThroughMSGraph - Parameters:
Enabled=true - Reason:
"Created by {Name of the Script} on {timestamp}"
- Name:
DeleteApplication
- Delete the dedicated Exchange application in Entra ID
ResetFirstPartyServicePrincipalKeyCredentials
- Remove all existing
keyCredentialsfrom theOffice 365 Exchange Onlinefirst-party application Service Principal - If a thumbprint was provided via
CertificateInformationparameter, purge only the certificate that matches the thumbprint and all certificates that are already expired
RemoveApiPermissionsFromAzureApplication
- Remove specific API permissions from the application in Entra ID based on the provided list of permissions via
RemoveApiPermissionsparameter
Frequently Asked Questions
❓ Can we configure the dedicated Exchange hybrid app even if not all our servers are updated to the version that support it?
Yes, you can still configure and enable the dedicated Exchange hybrid app. However, servers on older versions that don't support the dedicated hybrid app can't use rich coexistence hybrid features (Free/Busy, MailTips, and profile picture sharing) because Microsoft permanently blocked EWS access through the shared service principal on October 31, 2025. Update all your servers to a supported build as soon as possible to restore hybrid functionality. Once the dedicated app is created and enabled, updated servers automatically start using it.
❓ What happens if we re-run the Hybrid Configuration wizard (HCW) after configuring the new dedicated Exchange hybrid app?
If you re-run HCW and you don't uncheck Oauth, Intra Organization Connector and Organization Relationship, the Auth Certificate is uploaded to the Exchange Online service principal of the shared Office 365 Exchange Online application, but your environment continues using the dedicated application created by the script because HCW does not modify the server settings override. If, however, you've used the script in Service Principal Clean-Up Mode to remove the key credentials of the shared service principal after configuring the dedicated Exchange hybrid app, re-running the HCW will re-upload the certificate to the shared service principal, and you need to run the clean up again.
❓ We have many Exchange servers in our organization. Does every server need a separate dedicated Exchange hybrid app?
Dedicated Exchange hybrid app is created in your tenant's Entra ID and needs to be configured only once per tenant. All your on-premises servers are able to use the same dedicated application (once they are updated to April 2025 HU or later).
❓ Does this change impact migration of mailboxes between Exchange Server and Exchange Online?
This change does not impact either onboarding or offboarding mailbox moves between Exchange Online and Exchange Server.
❓ Does this change impact any third-party applications connecting to Exchange Online mailboxes using EWS protocol?
This change impacts only Exchange hybrid EWS calls from on-premises servers to Exchange Online. Remember that there is a October 2026 deadline for Retirement of Exchange Web Services in Exchange Online.
❓ We have a multi-tenant hybrid organization (a single on-premises AD forest connected to multiple Exchange Online tenants). What do we have to do?
The script must be run once per tenant, as it updates the corresponding Auth Server object and creates the required application in each tenant. If you're using the latest version of the script, it supports both All-in-one and Split Execution Configuration modes.
❓ We have a multi-forest on-premises deployment connecting to a single Exchange Online hybrid tenant. What should we do?
The script should be run for each Exchange on-premises organization / forest. This action creates multiple dedicated hybrid apps in the single Microsoft 365 tenant, each named
ExchangeServerApp-{GUID of the Exchange organization}. Since EWS access through the shared service principal was permanently blocked on October 31, 2025, rich coexistence hybrid features only work through the dedicated hybrid app. Make sure to configure and enable the dedicated app in all forests and update all servers to a supported build to restore hybrid functionality across your environment.
❓ We have concerns with the dedicated Exchange hybrid app script assigning too many EWS permissions to the new dedicated application.
Starting with the May 2026 Hotfix Update, Exchange Server can use Graph API for majority of the hybrid features. There are still some features that require EWS permissions, because they aren't yet supported with Graph API yet. If you rely on any of those features, you need to keep the EWS permissions assigned to the dedicated Exchange hybrid app until all features are supported with Graph API. If you don't use any of those features, you can remove the EWS permissions and use less permissive Graph API permissions for the dedicated Exchange hybrid app. More information can be found in the Configure Graph API permissions section of this documentation.
❓ Why has Microsoft taken the direction of making customers create their own dedicated hybrid application instead of publishing a new application that is managed by Microsoft?
The approach of using a dedicated application in customer tenant gives customers more flexibility for future changes that may require modifications to the app. Consider the upcoming shift from EWS to Graph API calls: adjustments to the application are necessary (for example, updating API permissions). A dedicated customer application allows customers to choose when they want to transition from EWS API permissions to Graph API permissions. Since the dedicated application is automatically created and configured by the PowerShell script or the Hybrid Configuration wizard, there is no added benefit for customers using a Microsoft managed application.
❓ Does it matter if an organization uses Modern or Classic Exchange hybrid configuration?
These changes apply to both Modern (Hybrid Agent) and Classic Exchange hybrid.
❓ We've created the dedicated Exchange hybrid application and set the permissions as per the documentation. We then finished our migration and do not host any mailboxes on-premises so rich-coexistence is not required anymore. Anything we should do?
If you do not require the rich coexistence features anymore, you can run the script in
Delete Application Mode to delete the dedicated Exchange hybrid application and keep using Exchange on-premises for management or SMTP relay scenarios only. It's also strongly recommended to run the script in Service Principal Clean-Up Mode. Deleting the dedicated Exchange hybrid application doesn't revert the configuration changes done on the Exchange Server (on-premises) side. Follow the steps outlined in the documentation if you want to revert the configuration, too.
❓ We use Hybrid Modern Authentication (HMA). What is the guidance for us?
Currently, HMA uses the first-party (shared) service principal. Since it is not required to upload the Auth Certificate to the shared service principal when setting up HMA, this scenario remains unaffected by the change and continues functioning as before. Therefore, it is safe to remove the Auth Certificate from the shared service principal after switching to the dedicated Exchange hybrid application.
❓ We use Microsoft Entra Connect (previously Azure AD Connect) for directory synchronization. All our mailboxes are hosted on-premises. Is it necessary to create the dedicated Exchange hybrid application?
If you've never ran the Hybrid Configuration wizard (HCW), there is no need to configure the dedicated Exchange hybrid application. However, if you ran HCW and intend to use hybrid features such as Free/Busy, MailTips, and profile picture sharing, creating the dedicated Exchange hybrid application is required.
❓ We have an Exchange hybrid setup but no on-premises mailboxes. We only use the server as an SMTP relay or recipient management. Do we need to create the dedicated Exchange hybrid application?
Creating the dedicated Exchange hybrid application is not required if you do not utilize hybrid features such as Free/Busy, MailTips, and profile picture sharing. To enable these hybrid features in the future, you need to configure the dedicated Exchange hybrid application.
❓ Our organization does not need rich coexistence and we just want to remove the certificate from the shared security principal. Do we need to install April HU first?
If all that you want to do is remove the certificate from the shared security principal and rich coexistence is not required, there is no dependency on installing the April 2025 before running the script. You can just run the script in the Service Principal Clean-Up Mode.
❓ We have Exchange hybrid setup for Microsoft Teams integration with on-premises mailboxes. Do we need to create a dedicated Exchange hybrid application or take any other action?
Creating the dedicated Exchange hybrid application is not required if all mailboxes are hosted on-premises. However, for environments where some mailboxes are hosted on-premises and others are hosted in Exchange Online, it's recommended to create the dedicated Exchange hybrid application. Doing so ensures that hybrid features such as Free/Busy, MailTips, and profile picture sharing continue to function properly.
❓ Can we rename the dedicated Exchange hybrid app from ExchangeServerApp-{Guid of the organization} to some other app name?
We recommend that administrators do not change the name of the app after it is created. Renaming the app could lead to the creation of a duplicate app in the future if the
ConfigureExchangeHybridApplication.ps1 script is re-run, for example, when renewing the Auth Certificate. The Hybrid Configuration wizard (HCW) also uses the unique name of the app to detect whether it has already been created. Therefore, we do not recommend renaming the application in Entra ID.
❓ We're using DAuth instead of OAuth. In this case, is it still necessary to create the dedicated hybrid application?
No, if you're using DAuth instead of the OAuth workflow, there's no need to create the dedicated Exchange hybrid application. However, if you've already run the script, please make sure not to create the Setting Override that enables the dedicated hybrid app feature on Exchange Server. Doing so could disrupt certain functionalities - such as Free/Busy lookups, MailTips, and profile picture visibility for on-premises users viewing online users.
❓ Is DAuth still supported going forward, and what is Microsoft's current recommendation regarding its use versus OAuth?
We recommend that customers begin transitioning to OAuth for Exchange hybrid deployments, as the legacy DAuth method will stop working with Exchange Online once Exchange Web Services (EWS) is retired in October 2026. While DAuth remains functional for now, Microsoft is working on developing alternate solutions for scenarios like Organization Relationships (OrgRel), which currently rely on DAuth.