While get user’s list of followed sites (using application permissions). By calling GET /me/followedSites endpoint gives "access denied”

Tanvi Mittal 0 Reputation points
2024-05-07T07:03:46.88+00:00

Hi team,

I was trying to get user’s list of followed sites (using application permissions). But calling GET /me/followedSites endpoint gives "access denied” and not able to know the root cause for this issue. Is something know issue or is it permission related issue.

please find error logs attached for the same.

thanks
Tanvi Mittal

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,779 questions
SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
9,793 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,701 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.
516 questions
SharePoint Server Development
SharePoint Server Development
SharePoint Server: A family of Microsoft on-premises document management and storage systems.Development: The process of researching, productizing, and refining new or existing technologies.
1,576 questions
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. CarlZhao-MSFT 37,551 Reputation points
    2024-05-07T08:05:15.1666667+00:00

    Hi @Tanvi Mittal

    According to the API documentation, it only supports delegated permissions.

    User's image

    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.

    0 comments No comments

  2. Tanvi Mittal 0 Reputation points
    2024-05-07T09:18:49.58+00:00

    Hi Carl

    We have enabled all these settings. And when we are trying to access sharepoint it gives the error as
    Exception Type: Microsoft.Graph.ServiceException

    Error: Code: accessDenied

    Message: Access denied

    Inner error:

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

  3. Tanvi Mittal 0 Reputation points
    2024-05-07T10:24:40.77+00:00

    Hi Carl,

    is this correct? We have done this and it is still giving same 404 error. Let me know if i am missing something here.

    User's image