Please specify what version of the library you are using: [ 2.0.4 ]
Please specify what version(s) of SharePoint you are targeting: [ SPO ]
I'm using the graph.me.getMemberGroups() call in my SPFx web part to get the list of groups the current user belongs to.
I expect the Promise to resolve with an object that contains the value property that is an array of group ids, i.e.:
getMemberGroups(securityEnabledOnly = false): Promise<{ value: string[] }>
The promise resolves directly with an array of strings and not an object with the value property. The type returned that I observe is Promise<string[]>
In the web dev console of my browser, I can see the post request to the Graph API https://graph.microsoft.com/v1.0/me/getMemberGroups.
The format of the response is:
{
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#Collection(Edm.String)",
"value": [
"627f3c12-8d33-3333-a380-48b1e175a728",
"121c6089-ee33-3333-afd0-4c5d09ffaa66"
]
}
I've created a test project that contains a single web part with this call in the render method:
https://github.com/dmitryrogozhny/test-graph-getMemberOf
Yep, looks like a bug on first glance. We'll take a look, thanks for reporting it.
@juliemturner - let's have a look at this one
The fix has been merged and will be out in release 2.0.5. Thanks for your patients.
Most helpful comment
The fix has been merged and will be out in release 2.0.5. Thanks for your patients.