Forum Discussion
Issues with PowerBI Service for auth in Snowflake
- 1 year ago
Hi Mxd24 - The issue you're encountering with Snowflake in Power BI likely stems from user permissions and the way Snowflake handles authentication and role-based access control.
The error message suggests that the Snowflake credentials for the affected user are either:
Invalid: The credentials provided (username/password) are incorrect.
Insufficient Privileges: The user's DEFAULT_ROLE in Snowflake or other assigned roles lack access to the required resources (e.g., database, schema, tables, or warehouse).Since you're using a composite model, Power BI is likely passing each user's credentials to Snowflake during query execution. This means each user must have appropriate access in Snowflake.
Yes, as long as you're using DirectQuery mode or composite models, every user must have appropriate access in Snowflake. Power BI does not cache the data but dynamically queries Snowflake using each user's credentials.
To avoid this:
You could switch to Import Mode, where only your credentials (as the report owner) are used to pull data. Users won't need Snowflake access, but they'll only see the data you imported at refresh time.
Hi Mxd24
The error happens because the user lacks the required Snowflake role or privileges to access the data.
Key Points:
User Permissions:
- Each user needs a Snowflake account with the correct default role and privileges (e.g., SELECT on the database/schema and USAGE on the warehouse).
- Without this, users can't view data in Power BI when using DirectQuery.
Solutions:
- Grant Access: Ensure users have the necessary permissions
GRANT SELECT ON SCHEMA my_database.my_schema TO ROLE user_role;
GRANT USAGE ON WAREHOUSE my_warehouse TO ROLE user_role;
โ
- Use a Service Account: Connect Power BI to Snowflake with a shared account and enforce Row-Level Security (RLS) in Power BI.
- Switch to Import Mode: Data is preloaded into Power BI, so users donโt need Snowflake credentials.
- Test User Credentials: In Power BI Service, verify the affected user's Data Source Credentials under Settings > Datasets.
Did I answer your question? Mark my post as a solution, this will help others!
If my response(s) assisted you in any way, don't forget to drop me a "Kudos" ๐
Kind Regards,
Poojara
Data Analyst | MSBI Developer | Power BI Consultant
Consider Subscribing my YouTube for Beginners/Advance Concepts: https://youtube.com/@biconcepts?si=04iw9SYI2HN80HKS