Change notification - create subscription error Operation: Create; Exception: [Status Code: ServiceUnavailable; Reason: Target resource ; hosted on database ; is currently on backend Unknown

Arunkumar Akuthota 26 Reputation points
2022-06-02T13:54:28.167+00:00

Operation: Create; Exception: [Status Code: ServiceUnavailable; Reason: Target resource 'xxxxxxxx-xxxx-xxxxxxx-000000000000' hosted on database 'xxxxxxx-xxxxxxxx-xxxx-xxxxxxxx' is currently on backend 'Unknown']

What to do?

Request data:

var sub = new Subscription
{
ChangeType = "created",
NotificationUrl = "https://dummy.com/api/graph",
Resource = $"/users/1234/messages",
ExpirationDateTime = DateTime.UtcNow.AddMinutes(10),
ClientState = "*******"
};

        return await graphClient
            .Subscriptions
            .Request()
            .AddAsync(sub);
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,549 questions
{count} vote

4 answers

Sort by: Most helpful
  1. Shivam Dhiman 5,946 Reputation points
    2022-06-07T13:20:56.983+00:00

    Hi @Arunkumar Akuthota

    One of our Customer had a similar issue "Status Code: ServiceUnavailable" while creating subscription.
    This issue has been resolved after removing the "clientState" property from request body. Please do verify the same at your end.

    Hope this helps,

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

    0 comments No comments

  2. Jørgen Iversen 16 Reputation points
    2022-10-10T12:05:59.86+00:00

    @ShivamDhiman-1582 I have the same issue, and have tested not to include the clientState, and I still get the same error message.


  3. hkr hasan 0 Reputation points
    2023-03-16T08:21:19.59+00:00

    also getting the same error if anyone has resolved this please comment with the answer


  4. Reinier Millo 5 Reputation points
    2024-03-25T04:44:05.13+00:00

    Hi, any solution to this problem? Also getting this problem.