[keycloak-user] Rest API for create user JSON

vivek dhayalan dvvivek at gmail.com
Thu Apr 7 05:24:38 EDT 2016


Thanks Dirk & Stian. I'm able to proceed with out any issues by following
your suggestions.

On 7 April 2016 at 11:30, Stian Thorgersen <sthorger at redhat.com> wrote:

> As Dirk said it's not supported. It will be improved in a future release,
> but for now you need to do the separate call to reset credentials endpoint.
>
> On 7 April 2016 at 03:39, vivek dhayalan <dvvivek at gmail.com> wrote:
>
>> But I could see create user API accepts UserRepresentation object in body
>> param which in turn accepts credentials as an attribute.
>>
>> Related links:
>>
>> http://keycloak.github.io/docs/rest-api/index.html#_create_a_new_user
>>
>> http://keycloak.github.io/docs/rest-api/index.html#_userrepresentation
>>
>> Thanks,
>> Vivek
>> On Apr 6, 2016 11:54 PM, "Dirk Franssen" <dirk.franssen at gmail.com> wrote:
>>
>>> I think it is not supported yet to do this in 1 call, you should:
>>> 1. create user
>>> 2. update user with role/group
>>> 3. reset-password or execute-actions-email (with UPDATE_PASSWORD action)
>>>
>>> Dirk
>>>
>>> On Wed, Apr 6, 2016 at 5:28 PM, vivek dhayalan <dvvivek at gmail.com>
>>> wrote:
>>>
>>>> Hi All,
>>>>
>>>> With the help of REST API (/admin/realms/{realm}/users) I'm trying to
>>>> create user in a realm. The API creates user in that realm but, credentials
>>>> w.r.t the user is not stored properly. I'm using the following JSON to
>>>> request body. Please let me know if I'm making some blunder mistake with
>>>> respect to credentials part of the JSON.
>>>>
>>>> {
>>>>     "username": "cjbarker5",
>>>>     "enabled": true,
>>>>     "emailVerified": false,
>>>>     "firstName": "CJ",
>>>>     "lastName": "Barker",
>>>>     "credentials": [
>>>>         {
>>>>             "type": "password",
>>>>             "value": "newPas1*",
>>>>             "temporary": false
>>>>         }
>>>>     ]
>>>> }
>>>>
>>>> --
>>>> Thanks & Regards
>>>> Vivek Dhayalan
>>>>
>>>> _______________________________________________
>>>> keycloak-user mailing list
>>>> keycloak-user at lists.jboss.org
>>>> https://lists.jboss.org/mailman/listinfo/keycloak-user
>>>>
>>>
>>>
>> _______________________________________________
>> keycloak-user mailing list
>> keycloak-user at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/keycloak-user
>>
>
>


-- 
Thanks & Regards
Vivek Dhayalan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/keycloak-user/attachments/20160407/a7f36bd4/attachment.html 


More information about the keycloak-user mailing list