How to get term store or taxonomy values from sharepoint using Microsoft Graph api

MOD Administrator 1 Reputation point
2022-09-03T07:10:09.58+00:00

I have SPFx app which is having the the permission "Termstore.Read.All" permission in config file under web api permission requests
{"resource":"Office 365 SharePoint Online",
"scope":"Termstore.Read.All"
}

Above permission is approved by admin under api permissions. But still I am not able to execute the graph api call https://graph.microsoft.com/beta/termStore/groups

Which throughs error saying "User doesn't have right access to site"....
As per microsoft documentation it should work... any assistance really it would be helpful...
Thank you in advance ......

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

2 answers

Sort by: Most helpful
  1. Zehui Yao_MSFT 5,831 Reputation points
    2022-09-07T07:12:48.063+00:00

    Hi @MOD Administrator , I've done some research on this issue, and through some documentation, it looks like the resource property seems to have the following requirements when the Microsoft Graph API is called in the SharePoint framework. So please refer to the following documents, Hope this helps. Best Regards.
    https://learn.microsoft.com/en-us/sharepoint/dev/spfx/use-aad-tutorial

    238435-untitled.png


    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.

    1 person found this answer helpful.

  2. Srinivasa Rao Darna 6,696 Reputation points Microsoft Vendor
    2022-09-06T13:06:07.26+00:00

    Hello @MOD Administrator ,

    Thanks for reaching Microsoft QnA, it seems from your query the API https://groups.microsoft.com/beta/termStore/groups is wrongly referred, it should be graph.microsoft.com not groups.microsoft.com https://graph.microsoft.com/beta/termStore/groups.

    By using GET https://graph.microsoft.com/beta/termStore/groups I am successfully able to get term store groups, please refer to my test result below.
    238251-termstore.png

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