Command aggregate failed: not authorized on DB to execute command

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Done
    • Priority: Major - P3
    • None
    • Affects Version/s: 2.2.4
    • Component/s: Security
    • Environment:
      Windows
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Doing

      _db.GetCollection<TEntity>(typeof(TEntity).Name).AsQueryable().Count()

      results in

      Command aggregate failed: not authorized on DB to execute command { aggregate: "Customer", pipeline: [ { $sort:

      { lastname: 1, companyShortTitle: 1 }

      }, { $group: { _id: 1, __result:

      { $sum: 1 }

      } } ], cursor: {} }.

      The user that uses the conncection has dbAdmin, dbOwner and readWrite roles.

              Assignee:
              Unassigned
              Reporter:
              Marko Hrovatic
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: