EXECUTE AS LOGIN failed with local windows group login I'm troubleshooting a permission issue that I tried to perform the query below
EXECUTE AS LOGIN = 'ComputerName\Windows Group Name';

SELECT * FROM fn_my_permissions(NULL, 'SERVER');  

SELECT * FROM fn_my_permissions (NULL, 'DATABASE'); 

SELECT *
FROM sys.login_token
WHERE principal_id &gt; 0;

revert;

It throws error at the first line with the message below

Cannot execute as the server principal because the principal
&quot;ComputerName\Windows Group Name&quot; does not exist, this type of
principal cannot be impersonated, or you do not have permission.

I confirmed the windows group and the login exists.
I search the error message and it seems people who faced the same error are not run into this while using windows group login.
Is it some native limitation or there is something I missed?
you can only impersonate login that appears in sys.server_principals
here an example from microsoft doc
https://docs.microsoft.com/en-us/sql/t-sql/statements/execute-as-transact-sql?view=sql-server-ver15#_user