Testing Webhook - domain does not matter

Hai Gatenyo 20 Reputation points


I am testing a connection to a Webhook I have connected to a Teams channel I have created.

I get the URL with my domain and send a message and get it. All is well.

My question is why when I write anything in my domain, it still works. Shouldn't the domain matter?

If I change even one letter in the generated paths it does not work, as expected, but in the part "icanwriteanything", I can literally write anything and it will still work.

I hope someone can shed some light on this matter, because I think it should not work. Maybe I missed something in the documentation.

Thank you.


Microsoft Teams
Microsoft Teams
A Microsoft customizable chat-based workspace.
9,406 questions
Microsoft Teams Development
Microsoft Teams Development
Microsoft Teams: A Microsoft customizable chat-based workspace.Development: The process of researching, productizing, and refining new or existing technologies.
2,974 questions
{count} votes

Accepted answer
  1. Prasad-MSFT 5,896 Reputation points Microsoft Vendor

    The behavior you are experiencing with the webhook URL is due to the wildcard domain feature that Microsoft Teams supports for webhook URLs. This feature allows you to have flexibility in the subdomain part of the URL while ensuring that the main domain remains the same.

    When you mention that you can write anything in the subdomain part of the URL (e.g., "icanwriteanything"), and it still works, it is because Microsoft Teams validates the main domain (in this case, "webhook.office.com") and allows flexibility in the subdomain part. This behavior is intentional and designed to provide developers with some level of flexibility while maintaining security standards.


    Prasad Das


    If the response is helpful, please click "Accept Answer" and upvote it. You can share your feedback via Microsoft Teams Developer Feedback link. Click here to escalate.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful