diff --git a/src/Auth.js b/src/Auth.js index 49934f1b756..2361c0b76dc 100644 --- a/src/Auth.js +++ b/src/Auth.js @@ -257,9 +257,15 @@ Auth.prototype._generateRoleGraphPipeline = function () { }, }, }, + { + $group: { + _id: { name: '$name' }, + }, + }, { $project: { - name: 1, + _id: 0, + name: '$_id.name', }, }, ], @@ -284,9 +290,15 @@ Auth.prototype._generateRoleGraphPipeline = function () { }, }, }, + { + $group: { + _id: { name: '$name' }, + }, + }, { $project: { - name: 1, + _id: 0, + name: '$_id.name', }, }, ],