How to determine the effective permissions for a user of a SQL Server database through C#?
When I say effective permissions, I'm referring to the permissions listed when you go into the properties of a database in SQL Server Management Studio, click "Permissions", and then click the "Effective" tab. So far, I have been able to determine the explicit permissions with the following code: using Microsoft.SqlServer.Management.Smo; ... DatabasePermissionInfo[] permissions = database.EnumDatabasePermissions("username"); However, I still need to obtain the effective permissions. In this scenario, I added a login for a user and gave it the role of db_datareader and db_datawriter for a