lvermeulen / Keycloak.Net

C# client for Keycloak 6.x
MIT License
204 stars 119 forks source link

Create Realm #21

Closed abodehq closed 3 years ago

abodehq commented 4 years ago

Great Work,

I just wanted to know if i can create realm by using .net api, i can see GetRealmsAsync , update, and delete.

can u please let me know how can i create new realm ??

thanks again.

lvermeulen commented 4 years ago

I'm not sure, but you could try importing a realm? It's effectively the same realm representation that you would use to update it; a POST instead of a PUT.

So give it a try: ImportRealmAsync(string realm, Realm rep)

Otherwise, play around with the path (use / or /admin instead of /admin/realms). Let me know how it goes!