John Humphreys
John Humphreys

Reputation: 39294

How do I list all of a user's roles in snowflake DB?

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.

Upvotes: 12

Views: 30625

Answers (1)

John Humphreys
John Humphreys

Reputation: 39294

It turns out that:

show grants to user <user-name>;

actually lists the roles of the user. I had tried this before and misread the output and ended up wasting a lot of time looking for alternatives.

Upvotes: 20

Related Questions