'Can't Read DataTable remotely using Window Authentication

When I use following connection string I can connect Server=MYSERVER;Trusted_Connection=True; Following Fails Server=MYSERVER;Initial Catalog=MYDATABASE;Trusted_Connection=True;

Using first connection string and using GetSchema I'm able to read the master database, but not MYDATABASE.

Using "select * from sys.server_principals"

enter image description here

Using "select * FROM [master].[sys].[database_principals]"

enter image description here

Using "select * FROM [MYDATABASE].[sys].[database_principals]"

enter image description here

How do I fix? The connection string is using Windows Credentials. I confused because master looks like I'm using SQL_USER while MYDATABASE is using WINDOW_USER. I'm trying to setup MYDATABASE to use the window group Domain Users. I'm using the schema dbo. I'm able to connect when I do not use Initial Catalog, only read from master (not MYDATABASE). So issue is with database not the Window Credentials.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source