When using db.adminCommand the balancerCollectionStatus command fails:
mongos> db.adminCommand({balancerCollectionStatus:'test.foo'})
{
"ok" : 0,
"errmsg" : "not authorized on admin to execute command { balancerCollectionStatus: \"test.foo\", lsid: { id: UUID(\"eb2eddd6-a9fc-4a8a-8c55-3d05daac22cb\") }, $clusterTime: { clusterTime: Timestamp(1583272313, 6) }, $db: \"admin\" }",
"code" : 13,
"codeName" : "Unauthorized",
"operationTime" : Timestamp(1583272354, 1),
"$clusterTime" : {
"clusterTime" : Timestamp(1583272354, 1)
}
}
The API should work similarly to shardCollection and with the same roles as shardCollection would.