Huachao / vscode-restclient

REST Client Extension for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=humao.rest-client
MIT License
5.29k stars 439 forks source link

Get MS Graph Users Delta #721

Open sanzic-wes opened 3 years ago

sanzic-wes commented 3 years ago

When I do:

# @name nextlink
GET https://graph.microsoft.com/v1.0/users/delta
Authorization: bearer {{auth.response.body.access_token}}

I get this response with heather, nextLink and value:

"@odata.nextLink": "https://graph.microsoft.com/v1.0/users/delta?$skiptoken=8aNJ13uxicmLHXjWBM5rfUNmxJ5gxH5upsmPT_YFW9cdqaYFFzc5pxH69z9hmDn2A_40mTY258ZW6FcWCP66-kVN0mJQIhcVO..."

Now I want to get the next page of users from the "@odata.nextLink": GET {{nextlink.response.body.@odata.nextLink}} Authorization: bearer {{auth.response.body.access_token}}

But I am getting Ivalid JSON query and getaddrinfo ENOTFOUND odata.nextlink. I am not sure how to format {{nextlink.response.body.@odata.nextLink}}?

sanzic-wes commented 3 years ago

I tried {{nextlink.response.body.*.}} but that gives me the value of "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users". I have a feeling that I am so close to "@odata.nextLink". This is the response I am getting:

HTTP/1.1 200 OK Cache-Control: private Content-Type: application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false;charset=utf-8 Content-Encoding: gzip Vary: Accept-Encoding request-id: xxx client-request-id: xxx x-ms-ags-diagnostic: {"ServerInfo":{"xxx"}} Preference-Applied: odata.track-changes OData-Version: 4.0 Strict-Transport-Security: max-age=31536000 Date: xxx Connection: close Content-Length: xxx

{ "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users", "@odata.nextLink": "https://graph.microsoft.com/v1.0/users/delta?$skiptoken=znMJSYCafhSk89-CvHZKqL50l_token_q7iwfA", "value": [ { "displayName": "Conference Room 3M8", "givenName": "Conference Room", "mail": "xxx", "surname": "3M8", "userPrincipalName": "xxx", "id": "xxx" }, ... }