angular - MS Graph Angular 按名称搜索用户
问题描述
在我的 Angular 应用程序中,应该有一个在组织内搜索用户的选项。应用程序本身受 MSAL 库保护,访问令牌由 MsalInterceptor 添加到所有请求标头中。
现在我想通过 HttpClientModule 搜索以“Joh”开头的用户:
this.http.get(`https://graph.microsoft.com/v1.0/users?$filter=startswith(displayName,'Joh')`, { headers: { ConsistencyLevel: 'eventual' } }).subscribe((response: any) => {
console.log(response);
});
就像这里描述的:https ://docs.microsoft.com/de-de/graph/api/user-list?view=graph-rest-1.0&tabs=http#code-try-15
不幸的是,我面临以下错误:
“在 URI 中指定的查询无效。在类型 'Microsoft.Fast.Profile.Web.Models._1._0.Profile' 上找不到名为 'displayName' 的属性。”
我做错了什么?
解决方案
推荐阅读
- php - 如何用 PHP 和 MySQL 实现 API 资源扩展
- python - pandas Timedelta 不将月份间隔识别为字符串(`3M` 或 `P3M`)
- curl - 在kafka桥srimzi上启用用户名和密码
- asp-classic - 我应该如何编码使用 XMLHttpRequest 发送的表单值
- javascript - 删除对象数组中的项目:打字稿
- sql - Oracle查询计算与日期数组完全相同的匹配
- c# - 如何使用 MultiSelection="true" 让默认值出现在 MudBlazor MudSelect 中?
- javascript - 如何获取列表项元素的索引而不是“显示:无”;
- python - 将 Matlab 数值运算符转换为 Python 时遇到问题
- python - 无法确认使用 python 从 AWS SNS 订阅 HTTP\S 端点?