I am currently using the following endpoints to access user specific sites (followed, frequent and suggested)
/_vti_bin/homeapi.ashx/sites/followed
/_vti_bin/homeapi.ashx/sites/recent
/_vti_bin/homeapi.ashx/sites/suggested
Both the /followed
and /suggested
work perfectly well, however the /recent
is only giving me this output :
{
"HttpStatus": "InternalServerError",
"ErrorMessage": "Office graph is disabled.",
"ErrorCode": 500011
}
According to brannmar (and the accepted answer) and after testing, the /recent
endpoint does work with the added header SPHome-ClientType: SharePointIOS
but from what he is saying, I won't be able to use this in a prodution environment.
I don't feel strongly about this endpoint particularly but I have not found any endpoint in Graph or the actual SharePoint Rest API that does something remotely similar.
I found these endpoints in various posts :
REST API to get Frequent Sharepoint Sites programmatically?
How to programmatically get Frequent Sharepoint Sites using REST API?
Office 365: The New SharePoint Homepage
The second post is the most interesting as you can see the issue was already here in dec-17 / jan-18. The OP suggests he posted a feedback on https://office365.uservoice.com but I can't seem to find it.
I have also tried using the endpoint used by the SharePoint Portal (https://<tenant>/_layouts/15/sharepoint.aspx) but I get an Unauthorized Access Exception because i don't know how to authenticate for this call.
Uri: https://northeurope1-sphomep.svc.ms/api/v1/sites/recent
The call is made only once (then it is cached probably in a hidden list on the user MySite) and uses a JWT Bearer Token (mine doesn't seem to work, but I guess it's normal since it's a token for my tenant)
I'm open to any suggestion !