Determine databases specified Login has access to on SQL Azure I need to obtain a list of all the databases a specific user has access to. To this end I am using the following ...

USE master;
GO
EXECUTE AS LOGIN = N'Login-I-Want-To-Check';
GO
SELECT name ,database_id
  FROM sys.databases 
  WHERE database_id &gt; 3 -- Eliminates system tables
  AND HAS_DBACCESS(name) = 1 
  ORDER BY name ASC
GO
REVERT; -- Switches context back to caller of this script


This works great on my DEV SQL Server but not on SQL Azure where I get this error ...

Msg 40517, Level 16, State 1, Line 3
Keyword or statement option 'login' is not supported in this version of SQL Server.


Does anyone know how to work around this so I can determine the databases a specified user has access to on Azure?
-- Run this query on master

SELECT A.name as userName, B.name as login, B.Type_desc, default_database_name, B.* 
FROM sys.sysusers A 
     FULL OUTER JOIN sys.sql_logins B 
     ON A.sid = B.sid
WHERE islogin = 1 and A.sid is not null

-- Run this on user databases

SELECT DB_NAME(DB_ID()) as DatabaseName, *
FROM sys.sysusers