Uploaded image for project: 'C# Driver'
  1. C# Driver
  2. CSHARP-1722

Command aggregate failed: not authorized on DB to execute command

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • None
    • 2.2.4
    • Security
    • Windows

    Description

      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.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: