如何按appOwnerOrganizationId为空筛选Microsoft Entra服务主体?
筛选Azure AD服务主体的问题记录
可正常执行的筛选操作
- 按所属租户筛选服务主体:
get-mgserviceprincipal ` -filter "appOwnerOrganizationId eq f8cdef31-a31e-4b4a-93e4-5f571e91255a" ` -top 5 -ConsistencyLevel eventual -CountVariable thecount - 筛选不属于特定租户的服务主体:
get-mgserviceprincipal ` -filter "NOT (appOwnerOrganizationId eq f8cdef31-a31e-4b4a-93e4-5f571e91255a)" ` -top 5 ` -ConsistencyLevel eventual ` -CountVariable thecount
无法解决的筛选场景
尝试筛选appOwnerOrganizationId为null的服务主体时触发查询错误。由于appOwnerOrganizationId定义为Edm.Guid类型,无法与空字符串''比较,尝试使用$null、$$null或null进行比较均返回以下错误:
Get-MgServicePrincipal_List: Unsupported Query.
内容的提问来源于stack exchange,提问作者Mark Mascolino
相关产品推荐
相关产品推荐

