Change multiple dashboards owner

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.


 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
url: '/api/v1/dashboards?fields=oid,owner',
success: function(res) {
var dashboards = res.filter(function(dash) {
return prism.user._id === dash.owner
var dashboardsList = [];
dashboards.forEach(function(dashboard) {
if (dashboardsList.length) {
function changeOwnership(dashboardsList) {
var succeed = [];
var failed = []
dashboardsList.forEach(function(dash) {
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) {
error: function(res) {
console.log('Dashboard\'s owner was changed successfully for: ');
console.log('Dashboard\'s owner wasn\t changed successfully. Please, try to change owner manually for: ');