So in SSMS I can't just right click on a system stored procedure (msdb database) and view properties on it.
So if I want to grant additional permissions I have to use GRANT to do that.
However, I first want to view everyone who already has permissions for that system sproc.
But how do I go about doing that?
I can select from [msdb].[sys].[database_permissions], but then I need a lookup to figure out what the object is, what would I join the major_id field on? That is what links back to the actual object being described, right?
sys.database_principals is who the users actually are so:
sys.database_principals INNER JOIN sys.database_permissions
ON sys.database_principals.principal_id = sys.database_permissions.grantee_principal_id
Works to get me names of users, but I still don't see how to get the name of the object that the user has permissions to?