Search code examples
azuregraphazure-web-app-service

Using $expand in Graph API query with multiple attributes?


Is it possible to $expand multiple attributes. For example:

https://graph.microsoft.com/beta/me?$expand=memberOf,manager

This will result in an error.

The result of parsing $expand contained at least 2 items, but the maximum allowed is 1.


Solution

  • Please refer to document($expand section) :

    https://developer.microsoft.com/en-us/graph/docs/overview/query_parameters

    If you query on the user resource, you can use $expand to get the properties of only one child object or collection at a time.

    And here is a discussion about same topic :

    However, specific entities may still have limits and for users it is still limited to a single expanded navigation. That is not expected to change.