List all users on SQL Server for auditing I'm using SQL Server Management Studio 17 and I'm trying to list all the users for auditing in an organized way with mentioning their database name. 

I tried the query below but it's showing the users in different schedules and some users are duplicated.

exec sp_MSforeachdb 'select * from ?.sys.sysusers'


What could I use/try instead?
Users are shown 'duplicated' simply because each database has its own users.

It may help to extend your query a little, so you can see which database each set of users is coming from:

exec sp_MSforeachdb 'select ''?'' as DBNAME, * from ?.sys.sysusers'


Note the important differences between a Login and a User :


  A Login is for Authentication.
  A Login verifies that you can access the server.
  There are two types: SQL Logins and Windows Logins.
  Logins are created at the SQL Server instance level (and stored in master).
  
  A User is for Authorization.
  Authorization decides what you can do in a database.
  A User needs to be linked to a Login.
  A User doesn't have a password - the Login decides where that is stored.
  It is quite usual to have Users from different databases linked to a single Login on the server.
  Users (and their Roles) are stored in each database, not in master (see Security &gt; Users in each database when using SSMS).