K2 SCIM API Reference

K2 implements basic CRUD operations based on the SCIM 2.0 protocol for managing user identity information. Identity providers like AAD can create and update identity information in K2 using the SCIM standard and targeting a specific SCIM endpoint for the target K2 environment. This reference topic shows the properties, attributes and operators implemented in K2 for these SCIM operations. Use this reference to create your own SCIM-compliant provider to pass user and group identity information to your K2 environment's specific SCIM endpoint.

The SCIM standard contains many more identity attributes than is described here and is well documented online at System for Cross-domain Identity Management (SCIM). This topic shows only those attributes that K2 uses.

Your K2 environment will have a dedicated SCIM URL, and might have more than one SCIM URL if you have different Identity Providers or different domains to sync with K2. You will receive your environment's SCIM URL and Token value for your K2 environment from K2 Cloud operations as part of your onboarding process or Identity Provider registration process. Be sure to use the correct URL and endpoint for the operation that you need to implement on your Identity Provider.

In the sample request URls listed in this topic, replace the [placeholder] values with the appropriate values for the K2 environment you are working with:

Operations

Operations URL for users URL for groups HTTP Responses Notes
Service Provider Config GET {ScimBaseUrl}/scim/v2/ServiceProviderConfig N/A 200 OK  
Create POST [ScimUrl]/Users POST [ScimUrl]/Groups 201 Success
400 Bad request
409 Conflict
 
Get GET [ScimUrl]/Users/{UserID} GET [ScimUrl]/Groups/{GroupID} 200 User/Group exists
400 Bad request
404 Not found
A GET operation's results are limited to 100 returned items. For example:
  • GET /users returns at most 100 users
  • GET /groups returns at most 100 groups, each group with at most 100 users. This could potentially return 10 000 results (100 groups x 100 users per group)
The results are ordered alphabetically, first by displayName then by Name if a displayName does not exist.
Update PATCH [ScimUrl]/Users/{UserID} PATCH [ScimUrl]/Group/{GroupID} 200 Success Use this operation to Update an existing user/group’s specific properties. This is effectively an UPDATE operation.
Delete DELETE [ScimUrl]/Users/{UserID} DELETE [ScimUrl]/Groups/{GroupID} 200 Success Marks a user or group as Inactive
Replace PUT [ScimUrl]/Users/{UserID} PUT [ScimUrl]/Groups/{GroupID} 200 Success Use this operation to delete existing and insert new user/group properties. When using Replace, all properties omitted will remove those properties from the result. To Replace correctly, first Get the resource, modify its result and use that as the body for the Replace operation.

K2 core properties

K2 maps the following core properties to SCIM standard properties:

K2 property SCIM property
Name Username
DisplayName DisplayName
Email Primary Email
ScimID ID
ExternalID ExternalID

Filters

Use the Filter property to apply filters to GET requests. Filter results using an attribute, operator and value. You can combine filters with logical AND/OR operators and brackets.

 

  Sample URL Attributes Operators Logical Operators
GET /Users

GET [ScimUrl]/Users?filter={attribute}{op}{value}

  • GET [ScimUrl]/Users?filter={attribute}{op}{value}
    e.g.
    GET [ScimUrl]/Users?filter=username eq someusername

You can combine filters with logical AND, OR and brackets:

  • GET [ScimUrl]/Users?filter={attribute}{op}{value} and {attribute}{op}{value}
    e.g.
    GET [ScimUrl]/Users?filter=externalId eq 123 and username co somevalue
  • GET [ScimUrl]/Users?filter={attribute}{op}{value} or {attribute}{op}{value}
    e.g.
    GET [ScimUrl]/Users?filter=externalId eq 123 or externalId eq 456
  • GET [ScimUrl]/Users?filter={attribute}{op}{value} and ({attribute}{op}{value} or {attribute}{op}{value})
    e.g.
    GET [ScimUrl]/Users?filter=username co somevalue and (externalId co 123 or email ew com)
  • username
  • displayname
  • externalid
  • urn:ietf:params:scim:schemas:extension:enterprise:2.0:user:manager.displayName

  • urn:ietf:params:scim:schemas:extension:enterprise:2.0:user:manager.value

  • email
  • id
  • eq (Equals)
  • co (Contains)
  • ew
    (Ends With)
  • sw
    (Starts With)
  • and
  • or
GET /Groups

GET [ScimUrl]/Groups?filter={attribute}{op}{value}

  • DisplayName
  • ExternalId
  • members[value {op} {ID}]
  • members[display {op} {value}]
  • id
  • eq (Equals)
  • co (Contains)
  • ew
    (Ends With)
  • sw
    (Starts With)
  • and

  • or

HTTP Responses

Request header parameters

Parameter Type Description
Authorization String Set to Bearer <token>
Content-Type String Set to application/scim+json
Accept String Set to application/scim+json
The Bearer token and SCIM token are two different values.

API reference

Considerations