[keycloak-user] the admin rest api for realm import is not importing realm
Bruce Wings
testoauth55 at gmail.com
Mon Oct 22 00:46:27 EDT 2018
As mentioned in docs:
https://www.keycloak.org/docs-api/4.5/rest-api/index.html#_realms_admin_resource
when I send a request to : *http://localhost:8380/ <http://localhost:8380/>* I
get 200 OK, but when I go and check on the admin console, new realm is
not visible.
*but when* I send a request to : *http://localhost:8380/auth/admin/realms
<http://localhost:8380/auth/admin/realms>, *I get 401 unauthorized.
(keycloak server running on port 8380 and I am sending the bearer token
obtained from
http://10.252.70.71:8380/auth/realms/master/protocol/openid-connect/token)
Which is the accurate URL to import a realm json in keycloak?
*http://localhost:8380/
<http://localhost:8380/>* OR *http://localhost:8380/auth/admin/realms
<http://localhost:8380/auth/admin/realms>*
On Fri, Oct 19, 2018 at 7:43 PM Bruce Wings <testoauth55 at gmail.com> wrote:
> Can anyone suggest whether there is something wrong in the way I am
> sending request or is this an issue on keycloak side?
>
> On Thursday, October 18, 2018, Bruce Wings <testoauth55 at gmail.com> wrote:
>
>> As mentioned in docs:
>>
>>
>> https://www.keycloak.org/docs-api/4.4/rest-api/index.html#_realms_admin_resource
>>
>> I have created a post request via postman and the response is 200 OK, but
>> when I go and check on the admin console, new realm is not visible.
>>
>> Moreover, when I perform the same operation via an invalid token, then
>> also the response is 200 OK. Am I missing something here?
>>
>> Attached screenshot of postman request. (In the body I have copy pasted
>> entire contents of realm json file that was exported from another server)
>>
>>
More information about the keycloak-user
mailing list