1
votes

I am trying to fetch all the content that I am following (favorites) like sites and groups via the Microsoft Graph API. Like the content you get on the new SharePoint homepage /_layouts/15/sharepoint.aspx?v=following. I did not find anything like that on the https://graph.microsoft.io docs.

MemberOf GET /users/<id | userPrincipalName>/memberOf is not what I want.

1

1 Answers

2
votes

The Microsoft Graph doesn't support to get the following content. If you want it to support this feature, you can submit the feedback from here.

As workaround, you may consider use the SharePoint REST directly. We can use the My/Followed to get users, documents, sites, and tags that the current user is following.

Here is the sample REST for your reference:

GET http://<siteCollection>/<site>/_api/social.following/my/followed(types=15)

Request parameter

types

Type: Int32

The actor types to include. Users = 1, Documents = 2, Sites = 4, Tags = 8. Bitwise combinations are allowed.

More detail about SharePoint following REST, you can refer here.