UFN_SYSTEMROLE_GETUSERSIDLIST
Returns a table of SIDS (Windows Account IDs) for all of the users that belong to the given SYSTEMROLEID
Return
Return Type |
---|
table |
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@SYSTEMROLEID | uniqueidentifier | IN |
Definition
Copy
CREATE FUNCTION dbo.UFN_SYSTEMROLE_GETUSERSIDLIST(@SYSTEMROLEID uniqueidentifier)
/*
Returns a table of SIDS (Windows Account IDs) for all of the users that belong to the given SYSTEMGROUPID
*/
returns table
AS
RETURN
(
select U.USERSID, U.DISPLAYNAME
from dbo.APPUSER AS U
INNER JOIN dbo.SYSTEMROLEAPPUSER AS SRAU
ON U.ID=SRAU.APPUSERID
where SRAU.SYSTEMROLEID=@SYSTEMROLEID
and SRAU.FROMROLESYNC = 0
)