Graph Api create subscription returns Status Code: BadRequest; Reason: The value 'https://outlook.office365.com/api/v2.0/Users('Sandbox%40company.com')/Events' of parameter 'Resource' is invalid.]\n\nPOST

Mikhail 1 Reputation point
2025-06-27T14:12:45.7933333+00:00

In our java springboot app we use dependency https://mvnrepository.com/artifact/com.microsoft.graph/microsoft-graph/5.72.0

When we try to create eventhub subscription for meeting room via that API we are getting error:

com.microsoft.graph.http.GraphServiceException: Error code: ExtensionError\nError message: Operation: Create; Exception: [Status Code: BadRequest; Reason: The value 'https://outlook.office365.com/api/v2.0/Users('Sandbox%40company.com')/Events'of parameter 'Resource' is invalid.]\n\nPOST[https://graph.microsoft.com/v1.0/subscriptions\nSdkVersion] : graph-java/v5.72.0\nSdkVersion : graph-java/v5.72.0\n[...]\n\n400 : \n[...]\n\n[Some information was truncated for brevity, enable debug logging for more details]

Sandbox%40company.com - I changed this intentionally, in the original response there is a different email.

But the error is only for particular emails, not for all. Other emails work fine.

Azure Event Hubs
Azure Event Hubs
An Azure real-time data ingestion service.
719 questions
0 comments No comments
{count} votes

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.