I have a service account `foo` that my web site uses to interact with the (SQL Server 2005) database. The site is having an issue running a procedure that I can run just fine. I attempted to run the routine under the service account's context using the `EXECUTE AS USER` construct; however, SQL Server throws an exception when I attempt to run the statement. The exception reads as follows:
Msg 15404, Level 16, State 19, Line 1
Could not obtain information about Windows NT group/user 'CORPORATE\foo', error code 0x5.
Here is the statement I am executing:
EXECUTE AS USER = 'CORPORATE\foo';
I confirmed the login exists in the `sys.database_principals` view, and I can see expected results for the login when I use `sp_HelpUser` and `sp_HelpLogins`.
I am stumped. Any ideas?