Forum Discussion
Shibu Mathew
Apr 16, 2020Copper Contributor
SPFX @pnp/graph
Am trying to use beta endpoint for my graph API request. I tried setEndpoint, but it run out of error. Could not find the correct way to point to beta instead of v1.0. Am trying to filter teams from the groups, but the filter is not working v1.0 endpoint. Please suggest
graph.groups
.filter(`resourceProvisioningOptions/Any(x:x eq 'Team')`)
.get<Group[]>()
.then((groups) => {
console.log("groups.....", groups);
this.setState({
groups,
});
});
- Carlos_MarinsIron Contributor
Hey Shibu Mathew ,
Yeah, I wan't able to use the filter in graph queries either. I haven't used PnPJS for graph requests so I'm not sure what the problem is. Anyway, I think you can use the concat function to add your filter manually, like .concat(`?$filter=resourceProvisioningOptions/Any(x:x eq 'Team')`). Let me know if it doesn't work for you.