Issue Encountered during Microsoft 365 integration with Elastic cloud

We are currently working on integrating Elastic Cloud with one of our cloud-hosted Microsoft 365 mailboxes (hosted on Azure).
We have completed the following steps:
• Created a new Azure AD App and gathered all required details:
• Tenant ID
• Client ID
• Client Secret
• Added the target mailbox accounts to the newly created application
• Configured the Microsoft 365 integration in Elastic Cloud
• base URL for Microsoft 365 management API..
• We are attempting to fetch audit log data using an Elastic Agent running on a Logstash server, which is hosted in Azure.

:red_exclamation_mark: Problem Encountered:
The integration fails to connect. We see this error in the logs:

error:
{Post request to M365 API: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)

kindly help me to resolve it