5
votes

Is it possible to list all of the roles that a user has access to in Snowflake DB?

I seem to be able to show the users with access to a role but I can't figure out how to list the roles a user is granted. Of course I can crawl the roles and work at it from that angle, but it would be very beneficial to do the opposite.

1

1 Answers

7
votes

It turns out that:

show grants to user <user-name>;

Actually lists the roles of the user very trivially. I had tried this before and miss-read the output and ended up wasting a lot of time looking for alternatives.