Odata O365图形API,获取/组返回空实体
我正在尝试开发一个与O365群组集成的应用程序,为此我需要我能获得的所有信息。调用“”时使用图形API资源管理器 我得到的答案是这样的:Odata O365图形API,获取/组返回空实体,odata,office365,microsoft-graph-api,azure-ad-graph-api,Odata,Office365,Microsoft Graph Api,Azure Ad Graph Api,我正在尝试开发一个与O365群组集成的应用程序,为此我需要我能获得的所有信息。调用“”时使用图形API资源管理器 我得到的答案是这样的: { "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#groups/$entity", "id": "8143b56b-a4bb-43ef-8b17-a747b1cacec1", "createdDateTime": "2016-02-23T11:03:33Z",
{
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#groups/$entity",
"id": "8143b56b-a4bb-43ef-8b17-a747b1cacec1",
"createdDateTime": "2016-02-23T11:03:33Z",
"description": "asd asd asd ",
"displayName": "Test Group",
"groupTypes": [
"Unified"
],
"mail": "testgroup@fastgroup.onmicrosoft.com",
"mailEnabled": true,
"mailNickname": "testgroup",
"onPremisesLastSyncDateTime": null,
"onPremisesSecurityIdentifier": null,
"onPremisesSyncEnabled": null,
"proxyAddresses": [
"SMTP:testgroup@fastgroup.onmicrosoft.com"
],
"renewedDateTime": "2016-02-23T11:03:33Z",
"securityEnabled": false,
"visibility": "Public"
}
{
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#groups/$entity",
"id": "8143b56b-a4bb-43ef-8b17-a747b1cacec1",
"createdDateTime": null,
"description": null,
"displayName": "Test Group",
"groupTypes": [],
"mail": null,
"mailEnabled": null,
"mailNickname": null,
"onPremisesLastSyncDateTime": null,
"onPremisesSecurityIdentifier": null,
"onPremisesSyncEnabled": null,
"proxyAddresses": [],
"renewedDateTime": null,
"securityEnabled": null,
"visibility": null
}
但一旦我从我的应用程序调用相同的rest函数,我会将大多数实体设置为null,如下所示:
{
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#groups/$entity",
"id": "8143b56b-a4bb-43ef-8b17-a747b1cacec1",
"createdDateTime": "2016-02-23T11:03:33Z",
"description": "asd asd asd ",
"displayName": "Test Group",
"groupTypes": [
"Unified"
],
"mail": "testgroup@fastgroup.onmicrosoft.com",
"mailEnabled": true,
"mailNickname": "testgroup",
"onPremisesLastSyncDateTime": null,
"onPremisesSecurityIdentifier": null,
"onPremisesSyncEnabled": null,
"proxyAddresses": [
"SMTP:testgroup@fastgroup.onmicrosoft.com"
],
"renewedDateTime": "2016-02-23T11:03:33Z",
"securityEnabled": false,
"visibility": "Public"
}
{
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#groups/$entity",
"id": "8143b56b-a4bb-43ef-8b17-a747b1cacec1",
"createdDateTime": null,
"description": null,
"displayName": "Test Group",
"groupTypes": [],
"mail": null,
"mailEnabled": null,
"mailNickname": null,
"onPremisesLastSyncDateTime": null,
"onPremisesSecurityIdentifier": null,
"onPremisesSyncEnabled": null,
"proxyAddresses": [],
"renewedDateTime": null,
"securityEnabled": null,
"visibility": null
}
有人能告诉我我错过了什么吗
访问我的应用中的令牌作用域:Group.Read.All User.Read
谢谢 目前,我们只返回具有group.read.all权限的组的基本属性。我们将在将来更改它以返回所有属性(只要登录用户具有读取组属性信息的权限) 目前,您需要使用group.readwrite.all来获取组的完整属性 我会在更新后更新这个答案
希望这能有所帮助,考虑到应用程序使用的权限,这确实有点奇怪。请您提供一些详细信息,如客户端请求id和通话时间戳(您应该能够通过fiddler跟踪看到这一点)。非常感谢,这很有效。顺便说一句,我需要从O365中删除该应用程序并再次连接以获得新权限。azure广告中的更改是不够的。您可以撤销该应用并重新同意。那对你有用吗?你可以在这里撤销