Microsoft 365 Management API webhook validation fails with domain, works with IP

Gor 10 Reputation points
2025-07-30T16:29:49.5766667+00:00

Hello,

We are having trouble setting up a webhook for the Microsoft 365 Management Activity API. We’re using an AWS Application Load Balancer (ALB) with a valid TLS certificate for our domain. The webhook endpoint is publicly accessible and works fine when we test it manually using Postman or curl, and we also successfully receive event notifications from Microsoft at that same URL. However, when Microsoft tries to validate the webhook during subscription, it fails. Interestingly, if we use the public IP address of the load balancer instead of the domain name, the validation works. We also see in the ALB access logs that the load balancer responds with a 400 status code during Microsoft’s validation attempt. This behavior is new and started just two days ago, nothing has changed on our side in terms of ALB configuration, DNS, or certificates. Our listener is set up with HTTPS, and the target group routes correctly. It seems like Microsoft might be handling validation requests differently than event deliveries, possibly using a different DNS cache, but we’re not sure.

Any help or insights would be appreciated. Thanks in advance!

Microsoft 365 and Office | Development | Microsoft 365 Developer Program
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. TiNo-T 4,215 Reputation points Microsoft External Staff Moderator
    2025-07-31T02:19:30.6966667+00:00

    Dear @Gor,

    Thank you so much for contacting Microsoft Q&A. 

    Based on your description, I understand that you had a problem with Microsoft 365 Management Activity API webhook validation when using domain names behind AWS Application Load Balancers (ALBs). Also, you have tried to do many steps for this setup: 

    • Works with IP address during Microsoft’s validation. 
    • Fails with domain name, returning a 400 Bad Request during validation. 
    • Receives event notifications successfully after subscription is created. 
    • No changes were made to ALB, DNS, or TLS certs recently. 

    During my research, I find that there are several reasons that may cause it: 

    1.Microsoft may be using stale or cached DNS records during validation. 

    2.Validation requests might be routed differently than event notifications. 

    3.Microsoft’s validation logic is stricter, possibly rejecting responses due to: 

    • TLS handshake issues. 
    • Unexpected headers or content types. 
    • DNS resolution failures or mismatches. 

    In this situation, I suggest that you should re-check ALB Listener rules and target group health. This is for ensuring the listener is correctly configured for HTTPS and confirming the target group health checks are passing. 

    Also, I would like to ask for more details of your issue, please kindly provide me a screenshot of the 400 error that you mentioned. Besides that, I want to know that when you use Postman and curl, is it still work normally now? If not, please kindly provide a screenshot as well. 

    Additionally, you mentioned that it worked with the IP. Therefore, I advise that you can use it as a temporary method while you are checking it again. 

    Also, I find some articles that you can consult for this feature: 

    I hope this information can help you with your concern. 

    Wish you a pleasant day! 


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment". 

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread. 

    User's image


  2. Paul Barnes 0 Reputation points
    2025-08-04T07:13:21.13+00:00

    Hi, this issue has now been fixed by the MSFT team after escalation, it was a recently introduced bug - thanks for the support!


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.