简体   繁体   中英

Adding a user to WSO2 Identity Server



We're integrating our asp.net MVC client with WSO2's Identity Server v5.8.0. Below are the steps we've followed:
1) Created a Service provider for our MVC application & configured Inbound authentication with OAuth/OpenID configuration, also configured Inbound provisioning with primary user store.
2) In our MVC application, we've set up a WSO2 configuration using OWIN's WSO2 NuGet package with the generated client-id & client-secret from the service provider.
3) We've configured MongoDB as our primary user store.

Now we're trying to add a user using SCIM2 API ( https://localhost:9443/scim2/Users ). Below is the response we're getting:

{"schemas":["urn:ietf:params:scim:api:messages:2.0:Error"],"detail":"Cannot add user through scim to user store . SCIM is not enabled for user store WSO2.COM","status":"500"}

I've even changed below config in user-mgt.xml

<Property name="SCIMEnabled">true</Property>

What else do we need to configure? Is there any other way to add user in WSO2 Identity server apart from using SCIM APIs?

It seems like you are having two user stores the primary user store and a secondary user store named wso2.com . By adding the

<Property name="SCIMEnabled">true</Property>

To the user-mgt.xml you are enabling SCIM2 to the primary user store. Not the secondary user store. But from the API you are adding the user to the secondary user store. Since you havent enabled SCIM in the secondary user store you are getting this error. You have two options.

1) Add the user to PRIMARY user store

By analyzing the error that you are getting the user name of the user that you are trying to add should be some thing like

WSO2.COM/Abhishek

Change this to

Abhishek

2) Enable SCIM2 in the secondary user store

Log in to the management console and click list in User Stores sub menu under identity menu. The User Store Management page opens. There should be a user store named WSO2.COM Click on edit. Click on advanced tick the enable scim

在此处输入图片说明

Reference: https://docs.wso2.com/display/IS580/Using+the+SCIM+2.0+REST+APIs

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM