Skip to content

Commit c900fd2

Browse files
Merge pull request #229386 from FaithOmbongi/patch-7
Document correct filter syntax
2 parents ae59ba8 + f55b369 commit c900fd2

File tree

1 file changed

+11
-17
lines changed

1 file changed

+11
-17
lines changed

articles/active-directory/authentication/concept-certificate-based-authentication-certificateuserids.md

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -141,34 +141,28 @@ IIF(IsPresent([alternativeSecurityId]),
141141

142142
## Look up certificateUserIds using Microsoft Graph queries
143143

144-
Tenant admins can run MS Graph queries to find all the users with a given certificateUserId value.
144+
Authorized callers can run Microsoft Graph queries to find all the users with a given certificateUserId value. On the Microsoft Graph [user](/graph/api/resources/user) object, the collection of certificateUserIds are stored in the **authorizationInfo** property.
145145

146-
GET all user objects that have the value '[email protected]' value in certificateUserIds:
146+
To retrieve all user objects that have the value '[email protected]' in certificateUserIds:
147147

148-
```http
149-
GET https://graph.microsoft.com/v1.0/users?$filter=certificateUserIds/any(x:x eq '[email protected]')
150-
```
151-
152-
```http
153-
GET https://graph.microsoft.com/v1.0/users?$filter=startswith(certificateUserIds, '[email protected]')
148+
```msgraph-interactive
149+
GET https://graph.microsoft.com/v1.0/users?$filter=authorizationInfo/certificateUserIds/any(x:x eq '[email protected]')&$count=true
150+
ConsistencyLevel: eventual
154151
```
155152

156-
```http
157-
GET https://graph.microsoft.com/v1.0/users?$filter=certificateUserIds eq '[email protected]'
158-
```
153+
You can also use the `not` and `startsWith` operators to match the filter condition. To filter against the certificateUserIds object, the request must include the `$count=true` query string and the **ConsistencyLevel** header set to `eventual`.
159154

160-
## Update certificate user IDs using Microsoft Graph queries
161-
PATCH the user object certificateUserIds value for a given userId
155+
## Update certificateUserIds using Microsoft Graph queries
156+
157+
Run a PATCH request to update the certificateUserIds for a given user.
162158

163159
#### Request body:
164160

165161
```http
166-
PATCH https://graph.microsoft.us/v1.0/users/{id}
162+
PATCH https://graph.microsoft.com/v1.0/users/{id}
167163
Content-Type: application/json
168-
{
169164
170-
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users(authorizationInfo,department)/$entity",
171-
"department": "Accounting",
165+
{
172166
"authorizationInfo": {
173167
"certificateUserIds": [
174168
"X509:<PN>123456789098765@mil"

0 commit comments

Comments
 (0)