while fetching the schema extensions created by me, azure server is returning a lot of schemas that were not created by me

Jitendra Kaswa 1 Reputation point
2022-02-16T05:26:35.317+00:00

I am using an admin account and created some schema extension using graph explorer , and it created successfully ,but when i am trying to fetch the custom schemas created in my organization, server is returning a lot of schemas(1000+).all of these schemas were not created within my organisation, it is how to resolve this issue. i want to fetch all the schemas that are created in my organisation without using appId174743-screenshot-2022-02-16-at-105238-am.png

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

2 answers

Sort by: Most helpful
  1. Vasil Michev 105.5K Reputation points MVP
    2022-02-16T07:39:59.1+00:00

    Schema extensions are global, the only way to filter out your "own" is via the corresponding appId, which is stamped on the "owner" property. That, or filter them by names.

    0 comments No comments

  2. CarlZhao-MSFT 41,941 Reputation points
    2022-02-16T08:32:15.517+00:00

    Hi @Jitendra Kaswa

    When you call the List schemaExtensions endpoint, its response list will also contain schema extension definitions created by other developers from other tenants.

    Note: The list will also contain schema extension definitions (marked as Available) created by other developers from other tenants. This is different from other APIs that only return tenant-specific data. Extension data created based on schema extension definitions is tenant-specific and can only be accessed by apps explicitly granted permission.

    If you wish to list schemaExtensions only for your own tenant, filtering with appId seems to be the way to go.

    /schemaExtensions?$filter=owner eq '{appId}'  
    

    But if your work environment doesn't support filtering with appId, then I suggest you submit a user voice to the graph product team to add the "only list schemaExtensions for own tenants" feature.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


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.