Microsoft Graph error processing a storage extension white getting subscription by ID

Viewed 164

I am trying to get a subscription by ID from Microsoft Graph REST. If I list the subscriptions using GET /subscriptions, things are working fine and I am able to list all subscriptions. But if I take a subscription id from the list and try to get the details using GET /subscriptions/{id}, I am getting the following error:

{
  "error":
    {
      "code":"ExtensionError",
      "message":"There was an error processing a storage extension.",
      "innerError":
        {
          "date":"2021-10-12T06:59:47",
          "request-id":"ffa4f181-148d-49ed-8c9d-f551f6ddd6f0",
          "client-request-id":"ffa4f181-148d-49ed-8c9d-f551f6ddd6f0"
        }
    }
}

Any ideas on where I might be going wrong?

PS: I am trying to get an individual subscription because the /subscriptions route does not provide the clientState property which is required for me.

1 Answers

When I route to the same /subscription got the @odata.context link.

enter image description here

I open the same link and search for clientState and got its type but not its value.

Note: the clientState property value is not returned for security purposes. refer this github

enter image description here

Note : Client State is not set for the List Subscription on purpose by design, because subscription collections could be listed by say some other user (example tenant admin using Subscription.Read.All). It is not desirable to share this Client state information through the Listing API for that user who is not the creator of the subscription.

Reference : https://github.com/microsoftgraph/microsoft-graph-docs/issues/5248

Related