All*_*ech 3 c# azure-active-directory microsoft-graph-api
我使用下面的代码来查找 Department 中的用户:
string searhString="IT Admin Onsite";
var departmentPeoples = await graphServiceClient.Users.Request().Filter($"department eq '{searchString}'").Select(u => new {
u.DisplayName,
u.MobilePhone,
u.BusinessPhones,
u.UserPrincipalName
}).GetAsync();
Run Code Online (Sandbox Code Playgroud)
但是,我想搜索包含的所有部门,因此我的搜索字符串将是
字符串 searchhString="管理员";
我尝试过startswith,但是只有当给定示例代码中我的searchString 是“IT”时,这才有效。如何完成这个任务?
请帮忙。
| 归档时间: |
|
| 查看次数: |
6800 次 |
| 最近记录: |