The process of building custom applications and tools that interact with Microsoft Exchange Server
/distributionLists is a Microsoft Graph beta-only mailbox API. The documented create endpoint is:
POST /me/distributionLists
POST /users/{id | userPrincipalName}/distributionLists
The error:
{
"error": {
"code": "RequestBroker--ParseUri",
"message": "Resource not found for the segment 'distributionLists'."
}
}
indicates Microsoft Graph is not resolving that path in the request being sent.
Check these points:
- Use the beta endpoint exactly:
or:https://graph.microsoft.com/beta/users/{id-or-userPrincipalName}/distributionListshttps://graph.microsoft.com/beta/me/distributionLists - Ensure the token includes Contacts.ReadWrite permission. For create, the least-privileged permission is:
- Delegated:
Contacts.ReadWrite - Application:
Contacts.ReadWrite
- Delegated:
- Send the required headers:
-
Authorization: Bearer {token} -
Content-Type: application/json
-
- Ensure the JSON body includes at least the required property:
{ "displayName": "My Distribution List" }membersis optional. - If using an SDK, note that Microsoft Graph SDKs use v1.0 by default. For this API, the request must target beta.
A minimal HTTP example is:
POST https://graph.microsoft.com/beta/me/distributionLists
Authorization: Bearer {token}
Content-Type: application/json
{
"displayName": "My Distribution List"
}
If the request still returns Resource not found for the segment 'distributionLists', switch from /users/{userPrincipalName}/distributionLists to /me/distributionLists with a delegated token and verify the request is actually going to graph.microsoft.com/beta/... rather than v1.0. This API is documented only under beta, and beta APIs are subject to change and not supported for production use.