This quickstart will provide an example of User and Group custom stores. SCIM's data model is extensive; resources often contain many attributes that applications have no interest in storing. The SimpleApp example demonstrates how you might build a custom store to handle just the attributes that your application requires.
The SimpleApp is compatible with both Azure AD and Okta implementations of SCIM.
Download location
SimpleApp is on GitHub at the following location.
https://github.com/RockSolidKnowledge/Samples.Scim
Postman tests
The samples folder contains a 'Postman' folder that contains example SCIM requests. You can use these SCIM requests to exercise the SimpleApp. The folder contains two JSON files:-
- Rsk.ScimExamples.Env.postman_environment.json
- Rsk.ScimExamples.postman_collection.json
To run the tests:
- Download & install Postman
- Import files from 'Postman' folder into postman
- Select the environment 'Rsk.ScimExamples.Env' on postman ui
- Just run the tests from the 'Rsk.ScimExamples' postman collection
The sample actions in the postman script cover the basic SCIM operations for managing resources by using the following HTTP verbs. (See screenshot above):
- GET
- POST
- PUT
- PATCH
- DELETE
Basic UI
SimpleApp has a simple user interface. Running the SimpleApp will launch a browser containing the user interface.
The user interface displays an overview of existing users and roles.
Code structure
The example uses Entity Framework (EF) with SQLite provider and on startup will call DatabaseInitializer.Initialize
. This will initialize and seed the SQLite database if it hasn't already been done. The files of interest are:
- SCIM/AppUserStore.cs
- SCIM/AppRoleStore.cs
- Program.cs
The AppUserStore.cs and AppRoleStore.cs files contain a custom implementation of IScimStore