Inconsistent behaviors when retrieving channel members with graph API

Copper Contributor

Hello,

 

I was trying to get members in a private channel when I noticed that one of three results may appear when I call (http GET) the api:

https://graph.microsoft.com/beta/teams/{id}/channels/{id}/members

1. An error, possibly being "Unauthorized" or "Bad Gateway"

{
  "error": {
    "code": "Unauthorized",
    "message": "Failed to execute Aad backend request GetTenantSubscribedSkusRequest. Request Url: https://graph.windows.net/8146c981-eb5d-4f42-a507-6ba4554be38a/subscribedSkus?api-version=1.6, Request Method: GET, Response Status Code: Unauthorized, Response Headers: ocp-aad-diagnostics-server-name: WqKhWXvl1okXb47qljo0lPbR3WueJ7PneT8ez1L9elM=\r\nrequest-id: 93b4d095-07e5-4297-8218-5f72278fc5f1\r\nclient-request-id: 30a0f9a7-db67-431e-bb99-b624516b9f8a\r\nStrict-Transport-Security: max-age=31536000; includeSubDomains\r\nDate: Tue, 10 Dec 2019 03:10:07 GMT\r\n, Reason Phrase: Unauthorized",
    "innerError": {
      "request-id": "ef0e0908-c47a-4a4d-9d76-363630a390c1",
      "date": "2019-12-10T03:10:08"
    }
  }
}

2. Returns with a incomplete member list, some of the members are not included.

3. Returns with a full member list.

 

I also noticed that whenever I login the graph api explorer with my test account, the subsequent api calls in my program will no longer error out although being no change in code or request context (same token, same channel), Until some time later (probably a day or more), this may start to show up again.

My test code (c#) was rather simple, basically a http client GET request with a pre-requested string token and an endpoint url, and my test azure app was using "application" permission, instead of "delegate".

 

So my question is, what could be causing the api call to behave like in case 1 or 2, instead of 3?

 

Thanks.

2 Replies

@ck1521, I was unable to replicate this scenario. Tried keeping Graph explorer logged in and without logged in but i was able to get all the member in all scenario. 

Is there any particular sequence that you are following? if Yes, let me know the steps - i will try it again.

@Abhijit_MSFT Thanks for your reply.

Unfortunately(?) I tested on 2 of my previously problematic channels, none of them repeated that behavior, all of the members were successfully returned.

It's kind of weird because I'm pretty sure the results were pretty different last night.

But anyway, thanks for your help, and I'll post again if I'm getting another incomplete result in the future.

 

Thanks,