当我尝试从组驱动器项目中请求权限时,我找回的权限为空角色。
当我从“图形资源管理器”执行相同的请求时,我获得了不同的权限集,现在设置了“角色”字段。
这使我认为范围或权限有问题,但我不知道是什么。
ID no_rows
<fct> <int>
1 a 1
2 b 1
3 c 1
4 d 1
5 e 1
6 f 1
7 g 1
8 h 1
9 i 1
10 j 1
# ... with 16 more rows
我自己的代码返回:
$client = new http\Client;
$request = new http\Client\Request;
$request->setRequestUrl('https://graph.microsoft.com/v1.0/groups/xxx/drive/items/xxx/permissions');
$request->setRequestMethod('GET');
$request->setHeaders(array(
'cache-control' => 'no-cache',
'Authorization' => 'Bearer xxx'
));
$client->enqueue($request)->send();
$response = $client->getResponse();
var_dump(json_decode($response->getBody(), true));
但是图形浏览器返回:
{
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#groups('xxx')/drive/items('xxx')/permissions",
"value": [
{
"id": "xxx",
"roles": [],
"grantedTo": {
"user": {
"displayName": "Iedereen behalve externe gebruikers"
}
}
},
{
"id": "xxx",
"roles": [],
"grantedTo": {
"user": {
"email": "xxx",
"id": "xxx",
"displayName": "Iedereen - Leden"
}
}
}
]
}