cancel
Showing results for 
Search instead for 
Did you mean: 

Migrate users from one tenant to another

alejandro
8 - Cloud Apps
8 - Cloud Apps

I want to migrate  users from one tenant to another; I exported the first tenant users as well as their related data, then I deleted the users so I can recreate those users in the second tenant, I tried to use the REST API tool to add a new user, however, I'm getting an "Error: response status is 422" message as seen in the images below:Screenshot from 2024-05-30 09-00-13.pngScreenshot from 2024-05-30 09-01-15.png

This is the payload I'm using to recreate the user:

[
{
"_id": "665643c6367dfe002dfa9e7f",
"roleId": "5fbc47b1ded309103e86c139",
"userName": "alejandro_gran",
"firstName": "ALEJANDRO",
"lastName": "GRAN",
"email": "[email protected]",
"groups": [
"5fc300cf435a06002d5c8c25",
"5fc30117be402c002c2c9955",
"628bfc96c760f7002cd49da8",
"6137da88e5a7ed001a54935f"
],
"active": true,
"pendingExpiration": "2024-06-04T20:51:18.614Z",
"created": "2024-05-28T20:51:18.614Z",
"lastUpdated": "2024-05-28T21:06:24.121Z",
"lastLogin": "2024-05-28T21:06:24.121Z",
"activationExpires": 1717534278614,
"tenantId": "null",
"manifest": {
"tenants": {
"crossTenant": {
"allowed": false
}
}
},
"internalGroups": [
"62bb52c0a3df55001b5cbeff"
],
"preferences": {},
"lastActivity": "2024-05-28T21:06:24.055Z",
"uiSettings": {
"ecmNext": {
"dataPage": {
"hideListViewGuider": true
},
"guidersShown": {
"addData": true,
"ecActions": true,
"dashboards": true
}
}
}
}
]

2 ACCEPTED SOLUTIONS

alejandro
8 - Cloud Apps
8 - Cloud Apps

I managed to solve this.

View solution in original post

alejandro
8 - Cloud Apps
8 - Cloud Apps

I was able to add a user in a specific tenant using the next payload using REST API version 1.0:

{
"email": "[email protected]",
"userName": "alejandro_ran",
"firstName": "Alejandro",
"lastName": "Ran",
"roleId": "5fbc47b1ded309103e86c131",
"groups": [
"5fc300cf435a06002d5c8d65",
"2df32132be402c002c2c9886",
"5894da88e5a7ed001a54516f"
],
"tenantId": "88620637367dfe002dfa9e80",
"preferences": {

},
"uiSettings": {}
}

View solution in original post

5 REPLIES 5

alejandro
8 - Cloud Apps
8 - Cloud Apps

I managed to solve this.

DRay
Community Team Member
Community Team Member

Hi @alejandro,

Thank you for the update. How did you end up resolving it?

David Raynor (DRay)

Hey @DRay 

I added my solution in this page so other people get to know what I did to solve this issue.

DRay
Community Team Member
Community Team Member

Thank you! I appreciate you providing that solution, and I know other users do also!

David Raynor (DRay)

alejandro
8 - Cloud Apps
8 - Cloud Apps

I was able to add a user in a specific tenant using the next payload using REST API version 1.0:

{
"email": "[email protected]",
"userName": "alejandro_ran",
"firstName": "Alejandro",
"lastName": "Ran",
"roleId": "5fbc47b1ded309103e86c131",
"groups": [
"5fc300cf435a06002d5c8d65",
"2df32132be402c002c2c9886",
"5894da88e5a7ed001a54516f"
],
"tenantId": "88620637367dfe002dfa9e80",
"preferences": {

},
"uiSettings": {}
}