Error when trying to update values to a Schema Extension in the Graph API

Ryan Fraser 10 Reputation points
2023-01-12T08:41:01.15+00:00

I was trying to update the values for a schema extension through the graph API using the following patch request.

graph.api(https://graph.microsoft.com/v1.0/users/{user-id}).patch({
          [SCHEMA_ID]: {
             "prop1": 0,
             "prop2": 1,
             "prop3": 2,
           }
        });

When I run this request I get the following error.

Error: The number of extension values of the object has exceeded its limit. Please reduce the number of values and retry your request.

I believe the schema extension limit of 100 has been exceeded, but I am unsure how to remove these extension values as the schema extensions have been deleted.

Is there a way to fix this? Thank you for your help!

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,485 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. CharanyaB-MSFT 1,421 Reputation points Microsoft Vendor
    2023-01-17T12:56:35.2233333+00:00

    Hello @Ryan Fraser,

    To delete the extension property and its associated value from the resource instance, set its value to null.

    But if a schema extension definition is deleted without setting the schema extension to null, it makes the property and its associated user data undiscoverable.

    Documentation reference:

    Hope this helps.

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