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: articles/active-directory/manage-apps/use-scim-to-provision-users-and-groups.md
+31-26Lines changed: 31 additions & 26 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -630,7 +630,7 @@ The easiest way to implement a SCIM endpoint that can accept provisioning reques
630
630
1. In this folder, launch the FileProvisioning\Host\FileProvisioningService.csproj project in Visual Studio.
631
631
1. Select **Tools** > **NuGet Package Manager** > **Package Manager Console**, and execute the following commands for the FileProvisioningService project to resolve the solution references:
632
632
633
-
```
633
+
```powershell
634
634
Update-Package -Reinstall
635
635
```
636
636
@@ -699,6 +699,7 @@ To develop your own web service that conforms to the SCIM specification, first f
699
699
### Building a Custom SCIM Endpoint
700
700
Developers using the CLI libraries can host their services within any executable CLI assembly, or within Internet Information Services. Here is sample code for hosting a service within an executable assembly, at the address http://localhost:9000:
@@ -767,6 +768,7 @@ Developers using the CLI libraries can host their services within any executable
767
768
}
768
769
}
769
770
}
771
+
```
770
772
771
773
This service must have an HTTP address and server authentication certificate of which the root certification authority is one of the following names:
772
774
@@ -788,6 +790,7 @@ Here, the value provided for the certhash argument is the thumbprint of the cert
788
790
789
791
To host the service within Internet Information Services, a developer would build a CLI code library assembly with a class named Startup in the default namespace of the assembly. Here is a sample of such a class:
@@ -815,6 +818,7 @@ To host the service within Internet Information Services, a developer would buil
815
818
this.starter.ConfigureApplication(builder);
816
819
}
817
820
}
821
+
```
818
822
819
823
### Handling endpoint authentication
820
824
Requests from Azure Active Directory include an OAuth 2.0 bearer token. Any service receiving the request should authenticate the issuer as being Azure Active Directory for the expected Azure Active Directory tenant, for access to the Azure Active Directory Graph web service. In the token, the issuer is identified by an iss claim, like "iss":"https://sts.windows.net/cbb1a5ac-f33b-45fa-9bf5-f37db0fed422/". In this example, the base address of the claim value, https://sts.windows.net, identifies Azure Active Directory as the issuer, while the relative address segment, cbb1a5ac-f33b-45fa-9bf5-f37db0fed422, is a unique identifier of the Azure Active Directory tenant for which the token was issued. If the token was issued for accessing the Azure Active Directory Graph web service, then the identifier of that service, 00000002-0000-0000-c000-000000000000, should be in the value of the token’s aud claim. Each of the applications that are registered in a single tenant may receive the same `iss` claim with SCIM requests.
@@ -823,8 +827,8 @@ Developers using the CLI libraries provided by Microsoft for building a SCIM ser
823
827
824
828
1. In a provider, implement the Microsoft.SystemForCrossDomainIdentityManagement.IProvider.StartupBehavior property by having it return a method to be called whenever the service is started:
825
829
826
-
```
827
-
public override Action\<Owin.IAppBuilder, System.Web.Http.HttpConfiguration.HttpConfiguration\> StartupBehavior
@@ -841,7 +845,7 @@ Developers using the CLI libraries provided by Microsoft for building a SCIM ser
841
845
842
846
2. Add the following code to that method to have any request to any of the service’s endpoints authenticated as bearing a token issued by Azure Active Directory for a specified tenant, for access to the Azure AD Graph web service:
@@ -879,12 +883,12 @@ Developers using the CLI libraries provided by Microsoft for building a SCIM ser
879
883
>[!NOTE]
880
884
> This is an example only. Not all users will have a mailNickname attribute, and the value a user has may not be unique in the directory. Also, the attribute used for matching (which in this case is externalId) is configurable in the [Azure AD attribute mappings](customize-application-attributes.md).
881
885
882
-
````
886
+
```
883
887
GET https://.../scim/Users?filter=externalId eq jyoung HTTP/1.1
884
888
Authorization: Bearer ...
885
-
````
889
+
```
886
890
If the service was built using the CLI libraries provided by Microsoft for implementing SCIM services, then the request is translated into a call to the Query method of the service’s provider. Here is the signature of that method:
887
-
````
891
+
```csharp
888
892
// System.Threading.Tasks.Tasks is defined in mscorlib.dll.
889
893
// Microsoft.SystemForCrossDomainIdentityManagement.Resource is defined in
@@ -913,6 +917,7 @@ Developers using the CLI libraries provided by Microsoft for building a SCIM ser
913
917
stringSchemaIdentifier
914
918
{ get; }
915
919
}
920
+
```
916
921
917
922
```
918
923
GET https://.../scim/Users?filter=externalId eq jyoung HTTP/1.1
@@ -921,7 +926,7 @@ Developers using the CLI libraries provided by Microsoft for building a SCIM ser
921
926
922
927
If the service was built using the Common Language Infrastructure libraries provided by Microsoft for implementing SCIM services, then the request is translated into a call to the Query method of the service’s provider. Here is the signature of that method:
923
928
924
-
```
929
+
```csharp
925
930
// System.Threading.Tasks.Tasks is defined in mscorlib.dll.
926
931
// Microsoft.SystemForCrossDomainIdentityManagement.Resource is defined in
@@ -980,7 +985,7 @@ Developers using the CLI libraries provided by Microsoft for building a SCIM ser
980
985
981
986
2. If the response to a query to the web service for a user with an externalId attribute value that matches the mailNickname attribute value of a user doesn't return any users, then Azure Active Directory requests that the service provision a user corresponding to the one in Azure Active Directory. Here is an example of such a request:
982
987
983
-
````
988
+
```
984
989
POST https://.../scim/Users HTTP/1.1
985
990
Authorization: Bearer ...
986
991
Content-type: application/scim+json
@@ -1009,26 +1014,26 @@ Developers using the CLI libraries provided by Microsoft for building a SCIM ser
1009
1014
"title":null,
1010
1015
"department":null,
1011
1016
"manager":null}
1012
-
````
1017
+
```
1013
1018
The CLI libraries provided by Microsoft for implementing SCIM services would translate that request into a call to the Create method of the service’s provider. The Create method has this signature:
1014
-
````
1019
+
```csharp
1015
1020
// System.Threading.Tasks.Tasks is defined in mscorlib.dll.
1016
1021
// Microsoft.SystemForCrossDomainIdentityManagement.Resource is defined in
In a request to provision a user, the value of the resource argument is an instance of the Microsoft.SystemForCrossDomainIdentityManagement. Core2EnterpriseUser class, defined in the Microsoft.SystemForCrossDomainIdentityManagement.Schemas library. If the request to provision the user succeeds, then the implementation of the method is expected to return an instance of the Microsoft.SystemForCrossDomainIdentityManagement. Core2EnterpriseUser class, with the value of the Identifier property set to the unique identifier of the newly provisioned user.
1024
1029
1025
1030
3. To update a user known to exist in an identity store fronted by an SCIM, Azure Active Directory proceeds by requesting the current state of that user from the service with a request such as:
1026
-
````
1031
+
```
1027
1032
GET ~/scim/Users/54D382A4-2050-4C03-94D1-E769F1D15682 HTTP/1.1
1028
1033
Authorization: Bearer ...
1029
-
````
1034
+
```
1030
1035
In a service built using the CLI libraries provided by Microsoft for implementing SCIM services, the request is translated into a call to the Retrieve method of the service’s provider. Here is the signature of the Retrieve method:
1031
-
````
1036
+
```csharp
1032
1037
// System.Threading.Tasks.Tasks is defined in mscorlib.dll.
1033
1038
// Microsoft.SystemForCrossDomainIdentityManagement.Resource and
In the example of a request to retrieve the current state of a user, the values of the properties of the object provided as the value of the parameters argument are as follows:
@@ -1077,7 +1082,7 @@ Developers using the CLI libraries provided by Microsoft for building a SCIM ser
1077
1082
Here, the value of the index x can be 0 and the value of the index y can be 1, or the value of x can be 1 and the value of y can be 0, depending on the order of the expressions of the filter query parameter.
1078
1083
1079
1084
5. Here is an example of a request from Azure Active Directory to an SCIM service to update a user:
The Microsoft CLI libraries for implementing SCIM services would translate the request into a call to the Update method of the service’s provider. Here is the signature of the Update method:
If the service was built using the Common Language Infrastructure libraries provided by Microsoft for implementing SCIM services, then the request is translated into a call to the Query method of the service’s provider. The value of the properties of the object provided as the value of the parameters argument are as follows:
1137
1142
@@ -1171,7 +1176,7 @@ Developers using the CLI libraries provided by Microsoft for building a SCIM ser
1171
1176
1172
1177
The Microsoft Common Language Infrastructure libraries for implementing SCIM services would translate the request into a call to the Update method of the service’s provider. Here is the signature of the Update method:
@@ -1272,7 +1277,7 @@ Developers using the CLI libraries provided by Microsoft for building a SCIM ser
1272
1277
1273
1278
If the service was built using the Common Language Infrastructure libraries provided by Microsoft for implementing SCIM services, then the request is translated into a call to the Delete method of the service’s provider. That method has this signature:
1274
1279
1275
-
```
1280
+
```csharp
1276
1281
// System.Threading.Tasks.Tasks is defined in mscorlib.dll.
// is defined in Microsoft.SystemForCrossDomainIdentityManagement.Protocol.
@@ -1345,7 +1350,7 @@ Group resources are identified by the schema identifier, `urn:ietf:params:scim:s
1345
1350
| proxyAddresses |emails[type eq "other"].Value |
1346
1351
1347
1352
## Allow IP addresses used by the Azure AD provisioning service to make SCIM requests
1348
-
Certain apps allow inbound traffic to their app. In order for the Azure AD provisioning service to function as expected, the IP addresses used must be allowed. For a list of IP addresses for each service tag/region, see the JSON file - [Azure IP Ranges and Service Tags – Public Cloud](https://www.microsoft.com/download/details.aspx?id=56519). You can download and program these IPs into your firewall as needed. The reserved IP ranges for for Azure AD provisioning can be found under "AzureActiveDirectoryDomainServices."
1353
+
Certain apps allow inbound traffic to their app. In order for the Azure AD provisioning service to function as expected, the IP addresses used must be allowed. For a list of IP addresses for each service tag/region, see the JSON file - [Azure IP Ranges and Service Tags – Public Cloud](https://www.microsoft.com/download/details.aspx?id=56519). You can download and program these IPs into your firewall as needed. The reserved IP ranges for Azure AD provisioning can be found under "AzureActiveDirectoryDomainServices."
0 commit comments