Forum Discussion
Microsoft Fabric - Snowflake Database Item
Hello,
I'm testing the new GA Snowflake Database item in Microsoft Fabric. The creation of the connection works well, but once I use that connection in "Snowflake Database item", I have an error message saying
Unable to connect | role 'public' specified i the connect string is not granted to this user, or is not permited for the credentials being used. contact your local system administrator, or attempt to login with another role, e.g. PUBLICThis issue is only with Snowflake Database Item. When I use the same connection in Data Flow Gen2, it works well.
It seems that "Snowflake Database Item" uses behind the scene a "public" role to connect to Snowflake while Data Flow Gen2 allows you to set a role or it will use the default role in Snowflake.
PS: The public role is not used in our organization in Snowflake.
Thank you everyone for your help
Hello MahdiG
In Manage Connections and Gateways, Snowflake connections do allow you to specify a Role name. However, for Snowflake Database items, this value is not actually honoured at runtime. The UI hints at this, but it’s easy to miss.
The key line is right above the role field: “Advanced options are used for test connection only. Items that use this connection must specify these options in queries.” That means the role works for Test connection and for Power Query–based workloads like Dataflow Gen2, but not for all consumers.
Dataflow Gen2 works because it runs through Power Query and explicitly applies the role when creating queries. The Snowflake Database item, on the other hand, isn’t Power Query–based. It uses an internal metadata/sync engine and opens a session before any queries exist, so there’s nowhere to inject the role.
As a result, the Snowflake Database item falls back to its default session behaviour, which Snowflake effectively treats as PUBLIC. If PUBLIC isn’t granted, the login fails — even though a role is specified on the connection. In short, the Snowflake Database item currently ignores the connection‑level role setting, which is a product limitation rather than a user misconfiguration.
3 Replies
- deborshi_nagSuper User
Hello MahdiG
In Manage Connections and Gateways, Snowflake connections do allow you to specify a Role name. However, for Snowflake Database items, this value is not actually honoured at runtime. The UI hints at this, but it’s easy to miss.
The key line is right above the role field: “Advanced options are used for test connection only. Items that use this connection must specify these options in queries.” That means the role works for Test connection and for Power Query–based workloads like Dataflow Gen2, but not for all consumers.
Dataflow Gen2 works because it runs through Power Query and explicitly applies the role when creating queries. The Snowflake Database item, on the other hand, isn’t Power Query–based. It uses an internal metadata/sync engine and opens a session before any queries exist, so there’s nowhere to inject the role.
As a result, the Snowflake Database item falls back to its default session behaviour, which Snowflake effectively treats as PUBLIC. If PUBLIC isn’t granted, the login fails — even though a role is specified on the connection. In short, the Snowflake Database item currently ignores the connection‑level role setting, which is a product limitation rather than a user misconfiguration.
- MahdiGFrequent Visitor
Thank you deborshi_nag for your quick response
- v-dineshyaCommunity Support
Hi MahdiG ,
Thank you for reaching out to the Microsoft Community Forum.
Hi deborshi_nag , Thank you for your prompt response.
Hi MahdiG . Could you please refer below community thread.
Solved: Re: Snowflake PAT role assignments not honored in ... - Microsoft Fabric Community
I hope this information helps. Please do let us know if you have any further queries.
Regards,
Dinesh