当我尝试检索 Office365 组时,我是使用 AngularJS HTTP Get 的成员。我总是在 Chrome 中收到 400 - Bad Request 错误。在 IE 中,我确实得到了结果。
var endpoint = "https://graph.microsoft.com/v1.0/me/memberOf/$/microsoft.graph.group?$filter=groupTypes/any(a:a eq 'unified')";
this.$http.get(endpoint, {
headers: {
"Content-Type": "application/json;odata=verbose"
}
}).then(function (result) {
console.log(result);
}, function (error) {
console.log("error:" + error);
});
看起来 URL 中的引号被替换为 %27 并且 Microsoft Graph/OData 不支持这一点。我会得到以下错误:
Collection open properties are not supported in this release.
Microsoft Graph 中不再提供 JoinedGroups 资源。还有其他方法可以检索到我所属的组吗?还是在 Angular 中有另一种方法可以做到这一点?