2016-03-01 52 views
1

我正在尝试开发与O365组集成的应用程序,为此我需要获取所有信息。使用图形API资源管理器时,我称之为“https://graph.microsoft.com/v1.0/groups/” 我得到的答案是这样的:O365图形API,GET /组返回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": "[email protected]", 
    "mailEnabled": true, 
    "mailNickname": "testgroup", 
    "onPremisesLastSyncDateTime": null, 
    "onPremisesSecurityIdentifier": null, 
    "onPremisesSyncEnabled": null, 
    "proxyAddresses": [ 
     "SMTP:[email protected]" 
    ], 
    "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。

谢谢!

+0

这确实有点奇怪,因为您的应用程序正在使用的权限。你能否提供一些更详细的信息,例如客户请求ID和呼叫的时间戳(你应该能够通过提琴手的踪迹看到这一点)。 –

回答

1

目前我们只返回group.read.all权限的组的基本属性。我们将在未来更改此属性,以返回所有属性(只要登录用户有权读取组属性信息)。

现在您需要使用group.readwrite.all来获取组的完整属性。

我会在更新后更新此答案。

希望这会有所帮助,

+0

非常感谢,工作。顺便说一句,我需要从O365中删除应用程序,并再次连接,以获得新的权限。改变天蓝色广告是不够的。 –

+0

您可以撤销应用程序并重新获得同意。这对你有用吗?您可以撤销https://portal.office.com/account/#apps –

+0

是撤销也可以 –