Share via

Graph endpoint teamwork/sendActivityNotificationToRecipients 400 bad request invalid Microsoft Teams domain

Quentin Pla 0 Reputation points
2024-05-06T14:59:29.6333333+00:00

When I try to use the Microsoft Graph endpoint "/teamwork/sendActivityNotificationToRecipients" with this body :

{
  "topic": {
    "source": "text",
    "value": "Test",
    "webUrl": "https://teams.cloud.microsoft/l/entity/5b35b793-0f4d-4242-b54e-745efe80cbf2"
  },
  "activityType": "systemDefault",
  "previewText": {
    "content": "Test"
  },
  "recipients": [
    {
      "@odata.type": "microsoft.graph.aadUserNotificationRecipient",
      "userId": "eb97d5e7-8f93-44e4-b289-3d90218bc871"
    }
  ],
  "templateParameters": [
    {
      "name": "systemDefaultText",
      "value": "Test"
    }
  ]
}

I got a 400 Bad Request telling me that :

Invalid 'webUrl' specified, Weburl must start with a valid Microsoft Teams domain followed by '/l/'.

But the domain must be valid because it's the new Microsoft Teams domain that we need to migrate on.

If I use the old Microsoft Teams domain :

https://teams.microsoft.com

It works perfectly...

So what I'm doing wrong ? What are the valid domains ?

Microsoft Security | Microsoft Graph
0 comments No comments

1 answer

Sort by: Most helpful
  1. CharanyaB-MSFT 1,896 Reputation points
    2024-05-22T19:34:26.1733333+00:00

    Hello @Quentin Pla,

    Thanks for reaching Microsoft.

    I recognize your attempt to utilize the new domain; however, since the Graph API has not been updated to accommodate the new domain, this URL cannot be used at present. Please continue to use the https://teams.microsoft.com domain until further notice. Updates will be communicated through Microsoft's documentation and the changelog.

    Documentation Reference: https://learn.microsoft.com/en-us/microsoft-365/enterprise/cloud-microsoft-domain?view=o365-worldwide#microsoft-product-and-service-urls

    Hope this helps.

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

    Was this answer helpful?

    0 comments No comments

Your answer

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