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/app-provisioning/use-scim-to-build-users-and-groups-endpoints.md
+47-10Lines changed: 47 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,16 +8,14 @@ ms.service: active-directory
8
8
ms.subservice: app-provisioning
9
9
ms.workload: identity
10
10
ms.topic: conceptual
11
-
ms.date: 05/11/2021
11
+
ms.date: 08/18/2022
12
12
ms.author: kenwith
13
13
ms.reviewer: arvinh
14
14
---
15
15
16
16
# Tutorial: Develop a sample SCIM endpoint in Azure Active Directory
17
17
18
-
No one wants to build a new endpoint from scratch, so we created some [reference code](https://aka.ms/scimreferencecode) for you to get started with [System for Cross-domain Identity Management (SCIM)](https://aka.ms/scimoverview). You can get your SCIM endpoint up and running with no code in just five minutes.
19
-
20
-
This tutorial describes how to deploy the SCIM reference code in Azure and test it by using Postman or by integrating with the Azure Active Directory (Azure AD) SCIM client. This tutorial is intended for developers who want to get started with SCIM, or anyone interested in testing a SCIM endpoint.
18
+
This tutorial describes how to deploy the SCIM [reference code](https://aka.ms/scimreferencecode) with [Azure App Service](../../app-service/index.yml). Then, test the code by using Postman or by integrating with the Azure Active Directory (Azure AD) Provisioning Service. The tutorial is intended for developers who want to get started with SCIM, or anyone interested in testing a [SCIM endpoint](./use-scim-to-provision-users-and-groups.md).
21
19
22
20
In this tutorial, you learn how to:
23
21
@@ -28,11 +26,14 @@ In this tutorial, you learn how to:
28
26
29
27
## Deploy your SCIM endpoint in Azure
30
28
31
-
The steps here deploy the SCIM endpoint to a service by using [Visual Studio 2019](https://visualstudio.microsoft.com/downloads/) and [Azure App Service](../../app-service/index.yml). The SCIM reference code can also be run locally, hosted by an on-premises server, or deployed to another external service.
32
29
33
-
1. Go to the [reference code](https://github.com/AzureAD/SCIMReferenceCode) from GitHub and select **Clone or download**.
30
+
The steps here deploy the SCIM endpoint to a service by using [Visual Studio 2019](https://visualstudio.microsoft.com/downloads/) and [Visual Studio Code](https://code.visualstudio.com/) with [Azure App Service](../../app-service/index.yml). The SCIM reference code can run locally, hosted by an on-premises server, or deployed to another external service.
31
+
32
+
### Get and deploy the sample app
33
+
34
+
Go to the [reference code](https://github.com/AzureAD/SCIMReferenceCode) from GitHub and select **Clone or download**. Select **Open in Desktop**, or copy the link, open Visual Studio, and select **Clone or check out code** to enter the copied link and make a local copy. Save the files into a folder where the total length of the path is 260 or fewer characters.
34
35
35
-
1. Select **Open in Desktop**, or copy the link, open Visual Studio, and select **Clone or check out code** to enter the copied link and make a local copy.
36
+
# [Visual Studio](#tab/visual-studio)
36
37
37
38
1. In Visual Studio, make sure to sign in to the account that has access to your hosting resources.
38
39
@@ -55,11 +56,47 @@ The steps here deploy the SCIM endpoint to a service by using [Visual Studio 201
55
56
56
57

57
58
58
-
1. Go to the application in **Azure App Service** > **Configuration** and select **New application setting** to add the *Token__TokenIssuer* setting with the value `https://sts.windows.net/<tenant_id>/`. Replace `<tenant_id>` with your Azure AD tenant ID. If you want to test the SCIM endpoint by using [Postman](https://github.com/AzureAD/SCIMReferenceCode/wiki/Test-Your-SCIM-Endpoint), add an *ASPNETCORE_ENVIRONMENT* setting with the value `Development`.
59
59
60
-

60
+
# [Visual Studio Code](#tab/visual-studio-code)
61
+
62
+
1. In Visual Studio Code, make sure to sign in to the account that has access to your hosting resources.
63
+
64
+
1. In Visual Studio Code, open the folder that contains the *Microsoft.SCIM.sln* file.
65
+
66
+
1. Open the Visual Studio Code integrated [terminal](https://code.visualstudio.com/docs/terminal/basics) and run the [dotnet restore](/nuget/consume-packages/install-use-packages-dotnet-cli#restore-packages) command. This command restores the packages listed in the project files.
67
+
68
+
1. In the terminal, change the directory using the `cd Microsoft.SCIM.WebHostSample` command
69
+
70
+
1. To run your app locally, in the terminal, run the .NET CLI command below. The [dotnet run](/dotnet/core/tools/dotnet-run) runs the Microsoft.SCIM.WebHostSample project using the [development environment](/aspnet/core/fundamentals/environments#set-environment-on-the-command-line).
71
+
72
+
```dotnetcli
73
+
dotnet run --environment Development
74
+
```
75
+
76
+
1. If not installed, add [Azure App Service for Visual Studio Code](https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-azureappservice) extension.
77
+
78
+
1. To deploy the Microsoft.SCIM.WebHostSample app to Azure App Services, [create a new App Services](/azure/app-service/tutorial-dotnetcore-sqldb-app#2---create-the-app-service).
79
+
80
+
1. In the Visual Studio Code terminal, run the .NET CLI command below. This command generates a deployable publish folder for the app in the bin/debug/publish directory.
81
+
82
+
```dotnetcli
83
+
dotnet publish -c Debug
84
+
```
85
+
86
+
1. In the Visual Studio Code explorer, right-click on the generated **publish** folder, and select Deploy to Web App.
87
+
1. A new workflow will open in the command palette at the top of the screen. Select the **Subscription** you would like to publish your app to.
88
+
1. Select the **App Service** web app you created earlier.
89
+
1. If Visual Studio Code prompts you to confirm, select **Deploy**. The deployment process may take a few moments. When the process completes, a notification should appear in the bottom right corner prompting you to browse to the deployed app.
90
+
91
+
---
92
+
93
+
### Configure the App Service
94
+
95
+
Go to the application in **Azure App Service** > **Configuration** and select **New application setting** to add the *Token__TokenIssuer* setting with the value `https://sts.windows.net/<tenant_id>/`. Replace `<tenant_id>` with your Azure AD tenant ID. If you want to test the SCIM endpoint by using [Postman](https://github.com/AzureAD/SCIMReferenceCode/wiki/Test-Your-SCIM-Endpoint), add an *ASPNETCORE_ENVIRONMENT* setting with the value `Development`.
96
+
97
+

61
98
62
-
When you test your endpoint with an enterprise application in the [Azure portal](use-scim-to-provision-users-and-groups.md#integrate-your-scim-endpoint-with-the-azure-ad-scim-client), you have two options. You can keep the environment in `Development` and provide the testing token from the `/scim/token` endpoint, or you can change the environment to `Production` and leave the token field empty.
99
+
When you test your endpoint with an enterprise application in the [Azure portal](use-scim-to-provision-users-and-groups.md#integrate-your-scim-endpoint-with-the-azure-ad-provisioning-service), you have two options. You can keep the environment in `Development` and provide the testing token from the `/scim/token` endpoint, or you can change the environment to `Production` and leave the token field empty.
63
100
64
101
That's it! Your SCIM endpoint is now published, and you can use the Azure App Service URL to test the SCIM endpoint.
0 commit comments