Graph API delta request with deltatoken or skiptoken returns ErrorAccessDenied for shared resources
I'm having trouble retrieving contacts and messages from a shared account using the delta request.
The scenario is as follows:
User 1 shares their contacts with User 2 in the desktop Outlook app:
User 2 sends a request from Postman or Graph Explorer:
GET https://graph.microsoft.com/v1.0/users/{{User 1}}/contacts
The contacts are returned correctly.
User 2 sends a delta request to the same endpoint:
GET https://graph.microsoft.com/v1.0/users/{{User 1}}/contacts/delta
The contacts are also returned correctly, along with @odata.deltaLink
.
User 2 sends a GET
request to the link from the @odata.deltaLink
:
GET https://graph.microsoft.com/v1.0/users/{{User 1}}/contacts/delta?$deltatoken=LztZwWjo5...
After that, the server returns a 403 status:
{
"error": {
"code": "ErrorAccessDenied",
"message": "Access is denied. Check credentials and try again.",
"innerError": {
"date": "2022-10-11T13:30:21",
"request-id": "0330a098-8b43-4e9c-b2cf-006a6d1ce292",
"client-request-id": "9d3e4ec6-85b0-f32a-6989-9cd887cda89d"
}
}
}
Is there something missing in my configuration? Here are the permissions: