You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+9-4Lines changed: 9 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ page_type: sample
3
3
languages:
4
4
- csharp
5
5
products:
6
-
- dotnet
6
+
- dotnetcore
7
7
description: SCIM provisioning reference code
8
8
urlFragment: "update-this-to-unique-url-stub"
9
9
---
@@ -23,6 +23,8 @@ Use this reference code to get started on building a [SCIM](https://docs.microso
23
23
1. Basic requirements for CRUD operations on a user and group object (also known as resources in SCIM).
24
24
2. Optional features such as filtering and pagination.
25
25
26
+
Use the repository **[Wiki](https://github.com/AzureAD/SCIMReferenceCode/wiki)** for guidance on how to use this reference.
27
+
26
28
> [!NOTE]
27
29
> This code is intended to help you get started building your SCIM endpoint and is provided "AS IS." It is intended as a reference and there is no guarantee of it being actively maintained or supported.
28
30
@@ -37,6 +39,7 @@ Use this reference code to get started on building a [SCIM](https://docs.microso
37
39
|/ServiceProviderConfig|**Retrieve service provider's SCIM configuration**<br/>The SCIM features supported by each service provider can vary. (e.g. Service Provider A supports Patch operations while Service Provider B supports Patch Operations and Schema Discovery).|
38
40
39
41
## Getting Started
42
+
40
43
The `Microsoft.SystemForCrossDomainIdentityManagement` project contains the code base for building a SCIM API. The `Microsoft.SCIM.Sample` project is there as a sample for using the project. A step by step guide for starting up with the project can be found [here](docs/get-started.md)
41
44
42
45
## Navigating the reference code
@@ -49,18 +52,19 @@ This reference code was developed as a .Net core MVC web API for SCIM provisioni
49
52
2. The **Controllers** folder contains:
50
53
* The controllers for the various SCIM endpoints. Resource controllers include HTTP verbs to perform CRUD operations on the resource (GET, POST, PUT, PATCH, DELETE).
51
54
* Controllers rely on services to perform the actions.
52
-
3.The **Services** folder contains logic for actions relating to the way resources are queried and updated.
55
+
3.The **Services** folder contains logic for actions relating to the way resources are queried and updated.
53
56
* The service methods are exposed via the IProviderService interface.
54
57
* The reference code has services to return users and groups.
55
58
* The services are based on Entity Framework and DbContext is defined by the class ScimContext.
56
-
3. The **Protocol** folder contains logic for actions relating to the way resources are returned according to the SCIM RFC such as:
59
+
4. The **Protocol** folder contains logic for actions relating to the way resources are returned according to the SCIM RFC such as:
57
60
* Returning multiple resources as a list.
58
61
* Returning only specific resources based on a filter.
59
62
* Turning a query into a list of linked lists of single filters.
60
63
* Turning a PATCH request into an operation with attributes pertaining to the value path.
61
64
* Defining the type of operation that can be used to apply changes to resource objects.
@@ -72,13 +76,15 @@ This reference code was developed as a .Net core MVC web API for SCIM provisioni
72
76
|`LICENSE`| The license for the sample. |
73
77
74
78
## Common scenarios
79
+
75
80
|Scenario|How-to|
76
81
|---|---|
77
82
|Enable or disable authorization|**Steps**<br/>1. Navigate to the **UsersController.cs** or **GroupController.cs** files located in **ScimReferenceApi > Controllers**.<br/>2. Comment or uncomment out the authorize command.|
78
83
|Add additional filterable attributes|**Steps**<br/>1. Navigate to the **FilterUsers.cs** or **FilterGroups.cs** files located in **ScimReferenceApi > Protocol**.<br/>2. Update the method to include the attributes that you would like to support filtering for. |
79
84
|Support additional user resource extensions|**Steps**<br/>1. Copy the **EnterpriseUser.cs** file located in **ScimReferenceApi > Schemas**.<br/>2. Rename the class to your custom extension name (e.g. customExtensionName.cs)<br/>3. Update the schema to match the desired naming convention.<br/>4. Repeat steps 1 - 3 with the **EnterpriseAttributes.cs** file (located in ScimReferenceApi > Schemas > Attributes) and update it with the attributes that you need.|
80
85
81
86
## Authorization
87
+
82
88
The SCIM standard leaves authentication and authorization relatively open. You could use cookies, basic authentication, TLS client authentication, or any of the other methods listed [here](https://tools.ietf.org/html/rfc7644#section-2). You should take into consideration security and industry best practices when choosing an authentication/authorization method. Avoid insecure methods such as username and password in favor of more secure methods such as OAuth. Azure AD supports long-lived bearer tokens (for gallery and non-gallery applications) as well as the OAuth authorization grant (for applications published in the app gallery). This reference code allows you to either turn authorization off to simplify testing, generate a bearer token, or bring your own bearer token.
83
89
84
90
**Option 1**: Turn off authorization (this should only be used for testing)
@@ -98,7 +104,6 @@ The SCIM standard leaves authentication and authorization relatively open. You c
98
104
99
105
Provided below are test cases that you can use to ensure that your SCIM endpoint is compliant with the SCIM RFC.
100
106
101
-
102
107
## Contributing to the reference code
103
108
104
109
This project welcomes contributions and suggestions! Like other open source contributions, you will need to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.
0 commit comments