Running through the same issue with Outlook calendars, Any way tor esolve this ?
Error on adding subscription on events using MS Graph
I am using the MS graph subscription endpoint (https://graph.microsoft.com/v1.0/subscriptions) to add a subscription on a calendars events for some of my end users outlook accounts. For some accounts (not all) this fails with this error:
{
"error": {
"code": "ExtensionError",
"message": "Operation: Create; Exception: [Status Code: ServiceUnavailable; Reason: Target resource 'xxxx-xxx-xxx-xxxx' hosted on database 'xxxx-xxx-xxx-xxxx' is currently on backend 'Unknown']",
"innerError": {
"date": "2021-05-31T08:27:37",
"request-id": "c7c38d7a-617c-4601-9684-0f924e86248a",
"client-request-id": "c7c38d7a-617c-4601-9684-0f924e86248a"
}
}
}
Just before adding the subscription my code have been able to add a new event to the same calendar, so I think that my access token has the right permissions to access the calendar. So I don't understand how I can get an "ExtensionError"?
Here is the C# code that I run to try to add the subscription:
var subscription = new Subscription
{
ChangeType = "created,updated,deleted",
NotificationUrl = GetNotificationUrl(),
Resource = $"me/calendars/{calendarId}/events",
ExpirationDateTime = DateTimeOffset.Now.AddHours(70),
ClientState = clientState,
};
await graphServiceClient
.Subscriptions
.Request()
.Header("Prefer", $"IdType=\"ImmutableId\"")
.AddAsync(subscription);
2 answers
Sort by: Most helpful
-
-
David P 1 Reputation point
2021-09-07T07:34:28.353+00:00 I fixed this by removing the "clientState" property in my request body. I was using json escaped body as a string, so maybe the API was having a tough time dealing with it.