How to List all Contained Users in a SQL Server Contained Database

Contained Databases feature is introduced in SQL Server 2012.

User authentication for contained users (users with passwords) is performed by the contained database.

To list all contained users that are authenticated by the contained database, use the following query:

USE Database_Name
SELECT name, type_desc, authentication_type, authentication_type_desc
FROM sys.database_principals WHERE authentication_type = 2


If the post helped you, please share it:
Pin It

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">