@@ -38,7 +38,7 @@ export function BulkImportModal({
3838 const groupIdMap : Record < string , string > = { } ;
3939 const fetchGroupsIds = async ( ) => {
4040 try {
41- const res = await fetch ( `${ API_BASE } /org-manager /${ encodeURIComponent ( realm ) } /groups` , {
41+ const res = await fetch ( `${ API_BASE } /realms /${ encodeURIComponent ( realm ) } /groups` , {
4242 headers : { Authorization : keycloak . token ? `Bearer ${ keycloak . token } ` : "" } ,
4343 } ) ;
4444 if ( ! res . ok ) return ;
@@ -54,7 +54,7 @@ export function BulkImportModal({
5454 for ( const name of groupNames ) {
5555 if ( groupIdMap [ name ] ) continue ;
5656 try {
57- const res = await fetch ( `${ API_BASE } /org-manager /${ encodeURIComponent ( realm ) } /groups` , {
57+ const res = await fetch ( `${ API_BASE } /realms /${ encodeURIComponent ( realm ) } /groups` , {
5858 method : "POST" ,
5959 headers : {
6060 Authorization : keycloak . token ? `Bearer ${ keycloak . token } ` : "" ,
@@ -76,13 +76,14 @@ export function BulkImportModal({
7676 continue ;
7777 }
7878 try {
79- const res = await fetch ( `${ API_BASE } /org-manager/ ${ encodeURIComponent ( realm ) } /users` , {
79+ const res = await fetch ( `${ API_BASE } /realms /users` , {
8080 method : "POST" ,
8181 headers : {
8282 Authorization : keycloak . token ? `Bearer ${ keycloak . token } ` : "" ,
8383 "Content-Type" : "application/json" ,
8484 } ,
8585 body : JSON . stringify ( {
86+ realm,
8687 username : u . username ,
8788 name : u . name ,
8889 email : u . email ,
@@ -103,7 +104,7 @@ export function BulkImportModal({
103104
104105 // Assign groups
105106 try {
106- const res = await fetch ( `${ API_BASE } /org-manager /${ encodeURIComponent ( realm ) } /users` , {
107+ const res = await fetch ( `${ API_BASE } /realms /${ encodeURIComponent ( realm ) } /users` , {
107108 headers : { Authorization : keycloak . token ? `Bearer ${ keycloak . token } ` : "" } ,
108109 } ) ;
109110 if ( res . ok ) {
@@ -119,7 +120,7 @@ export function BulkImportModal({
119120 const gid = groupIdMap [ gName ] ;
120121 if ( ! gid ) continue ;
121122 try {
122- await fetch ( `${ API_BASE } /org-manager /${ encodeURIComponent ( realm ) } /groups/${ encodeURIComponent ( gid ) } /members/${ encodeURIComponent ( uid ) } ` , {
123+ await fetch ( `${ API_BASE } /realms /${ encodeURIComponent ( realm ) } /groups/${ encodeURIComponent ( gid ) } /members/${ encodeURIComponent ( uid ) } ` , {
123124 method : "POST" ,
124125 headers : { Authorization : keycloak . token ? `Bearer ${ keycloak . token } ` : "" } ,
125126 } ) ;
0 commit comments