While get user’s list of followed sites, By calling GET /me/followedSites endpoint gives "access denied”

Satyam Rinayat 0 Reputation points
2024-05-27T11:59:59.05+00:00

Hi team, I was trying to get user’s list of followed sites, But calling GET /me/followedSites endpoint gives "access denied” and not able to know the root cause for this issue. Please let us know the exact setting that needs to be changed to resolve this issue or are we missing anything please provide your suggestion.
StatusCode: Forbidden RawResponseBody: {"error":{"code":"accessDenied","message":"Access denied","innerError":{"date":"2024-05-06T05:03:33","request-id":"85c976e5-6309-462e-a2d5-89ab8c90d24b","client-request-id":"85c976e5-6309-462e-a2d5-89ab8c90d24b"}}}

Thanks
Satyam Rinayat

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,149 questions
SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
10,083 questions
SharePoint Development
SharePoint Development
SharePoint: A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.Development: The process of researching, productizing, and refining new or existing technologies.
2,770 questions
SharePoint Workflow
SharePoint Workflow
SharePoint: A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.Workflow: An orchestrated and repeatable pattern of business activity, enabling data transformation, service provision, and information retrieval.
541 questions
SharePoint Server Management
SharePoint Server Management
SharePoint Server: A family of Microsoft on-premises document management and storage systems.Management: The act or process of organizing, handling, directing or controlling something.
2,866 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Saranya Madhu-MSFT 385 Reputation points Microsoft Vendor
    2024-05-27T14:00:54.8833333+00:00

    Hi Satyam Rinayat,

    Thanks for reaching out!

    As per the documentation, me/followedSites supports only the delegated permissions.

    I tried from my end by consenting to "Sites.Read.All" in Graph Explorer. It works fine.

    User's image

    Forbidden error occurs when access is denied to the requested resource. The user might not have enough permission or might not have a required license.

    Could you please verify by consenting to "Sites.Read.All" and execute the endpoint in Graph Explorer?

    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".