When querying the Microsoft Graph API utilizing the $search parameter a special header needs to be set (see error message). When additionally applying $expand the correctly provided header does not seem to be taken into account anymore.
Command Nameaz rest
Errors:
Bad Request({"error":{"code":"Request_UnsupportedQuery","message":"Request with $search query parameter only works through MSGraph with a special request header: 'ConsistencyLevel: eventual'","innerError":{"date":"2023-05-26T07:16:39","request-id":"...","client-request-id":"..."}}})
Describe the bug
When querying the Microsoft Graph API utilizing the
$search
parameter a special header needs to be set (see error message). When additionally applying$expand
the correctly provided header does not seem to be taken into account anymore.Command Name
az rest
Errors:
To Reproduce:
✔ Works:
❌ Does not work because of adding
$expand
:--verbose
shows that the header is set correctly.Expected Behavior
Should work with
$expand
ing as well.Environment Summary
Additional Context
Maybe
$expand
ing leads to subsequent requests where the header is not being forwarded to anymore?