Registering your EWS mail client with Azure AD
If you are enabling OAuth authentication for your EWS service, you must register your EWS service with Azure AD and define the level of access to the EWS service the user has once authenticated.
You may also need to set up a client secret or a client certificate, depending on which authorization method you choose to use.