我有这个JSON来创建一个新用户,该新用户对我有用,但是它没有将在组"groups":["APIs"]
选项卡中声明的组分配给该用户
json:
{
"username":"[email protected]",
"firstName":"1pruebattributesFN",
"lastName":"1pruebattributesAP",
"email":"[email protected]",
"enabled":true,
"groups":["APIs"],
"credentials":[
{
"temporary": false,
"type":"password",
"value":"1234"
}
],
"attributes":
{
"EmailVerifiedvn":"TRUE",
"Enabledvn":"TRUE",
"Entity":"[{\"id\":\"3411982108\",\"name\":\"3411982108 - Claro Home PAGO APP 2\"}]",
"State":"Activo",
"UserCreateDate":"202001031650Z",
"UserLastModifiedDate":"202001031655Z",
"UserStatus":"CONFIRMED"
}
}
已创建用户,但未将组分配给用户。
在我的密钥块中,我已经声明了3个组:
谢谢。
我认为这种方式不起作用,您可以使用以下API将用户分配给组:
Request URL: http://localhost:8080/auth/admin/realms/{realm}/users/{userId}/groups/{groupId}
Request Method: PUT