cancel
Showing results for 
Search instead for 
Did you mean: 
intapiuser
Community Team Member
Community Team Member
In case when you need to change the owner of multiple dashboards there are few ways:
1) In case all the dashboards are in 1 folder then you can select the folder and export the dashboards.

mceclip0.png

 After what, import the dashboards back under the user to whom you would like to transfer the dashboards. In this case you will need to republish the dashboards to users to whom they were shared before.
2)  Change the user email in the user profile under Admin tab-> Users  - ONLY to a new user. This option will not merge the accounts!
3)Use the script below under Sys.Admin in Web Developers console (F12 in Chrome)
Note, Dashboards and Elasicubes must be shared in advance!
var newOwnersId = "5e5cdc80ecebb629e0c8de85" //New owner, use the REST API to get user ID
$.ajax({
url: '/api/v1/dashboards?fields=oid,owner',
success: function(res) {
console.log(res)
var dashboards = res.filter(function(dash) {
return prism.user._id === dash.owner
})
var dashboardsList = [];
dashboards.forEach(function(dashboard) {
dashboardsList.push(dashboard.oid)
})
if (dashboardsList.length) {
changeOwnership(dashboardsList)
}
}
})
function changeOwnership(dashboardsList) {
var succeed = [];
var failed = []
dashboardsList.forEach(function(dash) {
$.ajax({
method: 'POST',
contentType: 'application/json',
data: JSON.stringify(
{
"ownerId": newOwnersId,
"originalOwnerRule": "edit"
}
),
url: '/api/v1/dashboards/' + dash + '/change_owner?adminAccess=true',
async: false,
success: function(res) {
succeed.push(dash)
},
error: function(res) {
failed.push(dash)
}
})
});
console.log('Dashboard\'s owner was changed successfully for: ');
console.log(succeed);
console.log('Dashboard\'s owner wasn\t changed successfully. Please, try to change owner manually for: ');
console.log(failed);
}
Comments
philip1001
8 - Cloud Apps
8 - Cloud Apps

Thanks, a lot of effort to pull this together!

This could work for a 1-off scenario, but I don't think it would be practical in general use 😞

Feels like a something that would be best/easiest addressed in the core product?

Version history
Last update:
‎03-02-2023 08:27 AM
Updated by:
Contributors
Community Toolbox

Recommended quick links to assist you in optimizing your community experience:

Developers Group:

Product Feedback Forum:

Need additional support?:

Submit a Support Request

The Legal Stuff

Have a question about the Sisense Community?

Email [email protected]

Share this page: