Enable modern authentication for the Mail service in BEMS
BEMS
If your
BEMS
environment uses Microsoft Graph
to communicate with Microsoft Office
365
, see Configure BEMS to communicate with a Microsoft Office 365 environment using Microsoft Graph API.
You must allow
BEMS
to authenticate with Microsoft Office
365
to access users’ mailboxes and send notifications to users’ devices when new email is received on the device. If your environment includes both on-premises Microsoft Exchange
Server
and Microsoft Office
365
, you can configure the environment for hybrid modern authentication. Hybrid modern authentication allows the on-premises Microsoft Exchange
Server
to use a more secure user authentication and authorization by consuming OAuth access tokens obtained from the cloud. For more information on how to configure an on-premises Microsoft Exchange
Server
to use hybrid modern authentication, visit configure-exchange-server-for-hybrid-modern-authentication?view=o365-worldwide.For information on configuring modern authentication for the Mail service using
BEMS
Cloud, see the BlackBerry Work Administration content. Verify that you have the following information and completed the appropriate tasks.
- If you have a hybridMicrosoft Office 365and on-premisesMicrosoft Exchange Serverenvironment, and you enable Modern Authentication, make sure that the on-premisesMicrosoft Exchange Serveris configured to use hybrid modern authentication. For more information, visit configure-exchange-server-for-hybrid-modern-authentication?view=o365-worldwide. If theMicrosoft Exchange Serveris not configured appropriately, users won't receive email notifications.
- Verify that you have the following information and completed the following task:
- If you enable modern authentication, obtain theClient Application ID. For instructions, see Obtain an Entra app ID for BEMS with credential authentication.
- If you enable Modern Authentication using a Client Certificate:
- Obtain theClient Application ID with certificate based authentication. For instructions, see Obtain an Entra app ID for BEMS with certificate-based.
- If your environment uses Modern Authentication with Credential Authentication and the federation metadata endpoint is protected by mutual TLS authentication, make sure that you imported the mutual TLS certificate in to theBEMSkeystore. For instructions, see Import the mutual TLS certificates into the BEMS keystore. This feature requires that you enable modern authentication using Credential or Client Certificate.
- In theBlackBerry Enterprise Mobility Server Dashboard, underBlackBerry Services Configuration, clickMail.
- ClickMicrosoft Exchange.
- In theSelect Authentication typesection, select an authentication type based on your environment and complete the associated tasks to allowBEMSto communicate withMicrosoft Office 365:Authentication typeDescriptionTaskCredentialThis option uses a definedBEMSusername and password to authenticate toMicrosoft Office 365using Modern Authentication.*
- In theUsernamefield, enter the service account's User Principal Name (UPN)
- In thePasswordfield, enter the password for the service account.
When using modern authentication,BEMSleverages the WS-Trust protocol. ForBEMSto authenticate withEntraID, the MetadataExchangeUri value must be set withinEntrain your organization's Federation settings. If the MetadataExchangeUri value is not set,BEMScannot authenticate using the modern authentication settings. For more information, visit set-msoldomainauthentication?view=azureadps-1.0.Some third-party identity providers (IDPs) may not require this value to be set during the initial configuration. If the MetadataExchangeUri for your organization is not currently set, consult with your IDP vendor or withMicrosoftbefore you make any changes to your Federation settings.Client CertificateThis option uses a client certificate to allow theBEMSservice account to authenticate toMicrosoft Office 365using Basic Authentication.- For theUpload PFX file, clickChoose Fileand select the client certificate file. For instructions on obtaining the .pfx file, see associate a certificate to theEntraapp ID forBEMS.
- In theEnter PFX file Passwordfield, enter the password for the client certificate.
Passive AuthenticationThis option uses an identity provider (IDP) to authenticate the user and provideBEMSwith OAuth tokens to authenticate toMicrosoft Office 365. In a hybrid environment, authenticates to on-premisesMicrosoft Exchange Server**.Proceed to step 5.*IfBEMSuses Credential Authentication to authenticate to aMicrosoft Office 365environment, you must enable Modern Authentication. For more information, visit deprecation-of-basic-authentication-exchange-online.**TheMicrosoft Exchange Serveron-premises must be configured to use hybrid modern authentication. For more information, visit configure-exchange-server-for-hybrid-modern-authentication?view=o365-worldwide. - Select theEnable Modern Authenticationcheckbox.
- If your environment uses Client certificate authentication, in theAuthentication Authorityfield, enter the Authentication Server URL thatBEMSaccesses and retrieve the OAuth token for authentication withOffice 365(for example, https://login.microsoftonline.com/<tenantname> or https://login.microsoftonline.com/<tenantid>). By default, the field is prepopulated with https://login.microsoftonline.com/common.
- In theClient Application IDfield, enter one of the followingEntraapp IDs:
- Credential and passive authentication: see Obtain an Entra app ID for BEMS with credential authentication
- Certificate-based authentication: Obtain an Entra app ID for BEMS with certificate-based authentication
- In theServer Namefield, enter the FQDN of theMicrosoft Office 365server. By default, the field is prepopulated with https://outlook.office365.com.When you configure modern authentication, all nodes use the specified configuration.
- If you use Credential or Client certificate authentication and the metadata endpoint is protected by mutual TLS authentication, select theUse Mutual TLS Authenticationcheck box to allowBEMSto respond to mutual TLS authentication requests. This step requires that the mutual TLS certificate is imported intoBEMS. For instructions, see Import the mutual TLS certificates into the BEMS keystore.When you configure modern authentication, all nodes use the specified configuration.
- If you use Passive Authentication, complete the following steps:
- In theRedirect URIfield, enter the URL that the IDP redirects the administrator to when the client app ID is authorized and the authentication tokens are provided. If you remotely log in to the computer that hosts theBEMSand perform the configuration from the computer's browser, enterhttps://localhost:8443/PassiveAuth, otherwise enterhttps://<FQDN of the computer that hosts the BEMS instance>:8443/PassiveAuthThe URI must be the same as theBEMSURI and whitelisted in the portal forEntraapplication ID.
- Clicklogin.
- Enter the credentials for the service account.
- ClickOKto acknowledge that the authentication tokens were obtained
- Important:BEMSdoesn't automatically refresh the OAuth tokens. Repeat steps b to d to refresh the OAuth tokens. The tokens expiration time depends on your tenant policy (by default, the token expiration is 90 days). When the OAuth tokens expire, email notifications on the users' devices stop. The OAuth token expiration is displayed after you login to the IDP.
- Under theAutodiscover and Exchange Optionssection, complete one of the following actions. Most environments only require the default settings. Before modifying the settings, test the change in your environment.TaskStepsOverride Autodiscover URLIf you select to override the autodiscover process,BEMSuses the override URL to obtain user information fromMicrosoft Office 365.
- Select theOverride Autodiscover URLcheckbox.
- In theAutodiscover URLfield, type the autodiscover endpoint (for example, https://example.com/autodiscover/autodiscover.svc).
Autodiscover andMicrosoft Exchange Serveroptions- Select theSwap ordering of <check box to assist in resolving the autodiscover URL. Consider selecting this option if the order results in timeouts or other failures.domain.com>/autodiscover and autodiscover. <domain.com>/autodiscover
- Modify theTCP Connect timeout for Autodiscover url(milliseconds)field as required to prevent failures when autodiscovery takes too long. By default, the timeout is set to 120000. The recommended timeout is between 5000 milliseconds (5 seconds) and 120000 milliseconds (120 seconds).
- By default, theEnable SCP record lookupcheckbox is selected. If you clear the checkbox,BEMSdoes not perform aMicrosoft Active Directorylookup of Autodiscover URLs. This option is not available when Override Autodiscover URL is selected.
- Select theUse SSL connection when doing SCP lookupcheckbox to allowBEMSto communicate with theMicrosoft Active Directoryusing SSL. If you enable this feature, you must import theMicrosoft Active Directorycertificate to each computer that hosts an instance ofBEMS. This option is not available when Override Autodiscover URL is selected.
- By default, theEnforce SSL Certificate validation when communicating with Microsoft Exchange and LDAP servercheck box is selected.
- By default, theAllow HTTP redirection and DNS SRV recordcheckbox is selected. If you clear the checkbox, you disable HTTP Redirection and DNS SRV record lookups for retrieving the Autodiscover URL when discovering users forBlackBerry WorkPush Notifications.
- Select theForce re-autodiscover of user on all Microsoft Exchange errorscheckbox to forceBEMSto perform the autodiscover again for the user whenMicrosoft Office 365returns an error message.
- In theEnd User Email Addressfield, type an email address to test connectivity toMicrosoft Office 365using the service account. You can delete the email address after you complete the test.
- ClickSave.