Search code examples
odataoffice365microsoft-graph-apiazure-ad-graph-api

O365 Graph API, GET /groups return null entities


i'm trying develop an app that integrate with O365 Groups, for that i need all the info i can get. using the Graph API Explorer when i call "https://graph.microsoft.com/v1.0/groups/" i get answer like this:

{
    "@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"
}

but once i'm calling the same rest function from my app i get most of the entities as null, like this:

{
    "@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
}

can someone please tell me what i'm missing?

Access token scopes in my app: Group.Read.All User.Read.

Thanks!


Solution

  • Currently we only return the basic properties of the group with the group.read.all permission. We will be changing that in the future to return all properties (as long as the signed-in user has permissions to read the group property information).

    For now you will need to use group.readwrite.all to get the full properties of the group.

    I'll update this answer once we make the update.

    Hope this helps,