I am trying to access users OneDrive details for particular tenant. I have used https://graph.microsoft.com/v1.0/users/{userid}/drives to get drive details. But it is returning data for admin user who is generated application ID in Azure Directory.
Going forward, I need to iterate drive items (https://graph.microsoft.com/v1.0/users/{userId}/drives/{driveId}/list/items) and items permission (https://graph.microsoft.com/v1.0/users/{userId}/drives/{driveId}/list/items/{itemId}/driveItem/permissions). But i stuck at fetching drive details itself.
I have given the Application permission as,
Files.Read.All - Read files in all site collection
Response header i am getting,
**content-type: application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false;charset=utf-8
cache-control: private
client-request-id: f612b993-7a31-4171-8feb-8f4ee1f6564b
request-id: f612b993-7a31-4171-8feb-8f4ee1f6564b**
Response Preview:
**{
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#drives",
"value": []
}**
Please suggest if i missing anything to get users onedrive details.
Thanks in advance.