Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more

Reply
Bhargava05
Frequent Visitor

Hide All database objects in SQL endpoint for users with read only access

When a lakehouse is shared with an user without any additional permissions. He is able to connect to the lakehouse through SQL end point and see all the schema, table names and column names. But since he only has read access, he won't be able to query the data.

Bhargava05_0-1742329246417.png

 

What I'm trying to do is, if a user has only read access, he shoudn't see any of the database objects like schema names, tables names etc. Everything has to be granted explicitly for the user to have access or to even see the schema name, table name through the sql end point.  I know using grant, i can let users query the data. But just with read only access as well, they are able to see all of the database objects which i wanted to restrict them from unless granted access. How do i do that. Any suggestions are much appreciated

5 ACCEPTED SOLUTIONS
v-sgandrathi
Community Support
Community Support

Hi @Bhargava05,

Thank you for using Microsoft Community Forum.

 

To prevent users from seeing any database objects unless explicitly granted, you need to revoke metadata visibility using the VIEW DEFINITION permission. This ensures users cannot even see the existence of schemas, tables, or columns.
You can refer to the following document for more information:

REVOKE (Transact-SQL) - SQL Server | Microsoft Learn

To further restrict access, you can explicitly deny direct access to specific objects if users were previously granted permission. This ensures they cannot view or query particular tables, even if other permissions are in place.
I’m sharing the DENY SQL link for your idea:

DENY (Transact-SQL) - SQL Server | Microsoft Learn

If you want the user to access specific tables, you need to explicitly grant them permission.
By following these steps, you can ensure that users with read-only access cannot see any database objects unless explicitly granted permission.

Please Accept as solution if this meets your needs and a Kudos would be appreciated.

Regards,
Sahasra.

View solution in original post

Bhargava05
Frequent Visitor

Hi @v-sgandrathi thanks for your reply!

 

I did try already revoking/denying view definition permission to the user. And i did try it back right now.

These were the intial permissions, we had on the sql endpoint before revoking or denying. 

Bhargava05_0-1742391156706.png

 

I used REVOKE VIEW DEFINITION ON DATABASE::lakehouse_tst FROM"user" first and then also

DENY VIEW DEFINITION ON DATABASE::lakehouse_tst TO "user", which resulted in 

Bhargava05_1-1742391291630.png

But still the user was able to see the metadata in the database.

 

And also is there a way where i can revoke view definition to all of the users instead of specifying each at a time? Like revoking view definition to public? I did try that as well, but didnt work tho.

Let me know your thoughts!

Would be of great help!!

 

Thanks!

View solution in original post

Hi @Bhargava05,

 

The reason the user still sees metadata, even after using REVOKE and DENY VIEW DEFINITION, is likely due to inherited permissions, especially from the public role, which all users are part of by default. Even if you revoke permissions from a specific user, they may still inherit visibility from this role or other implicit grants. To address this, ensure no unwanted permissions remain on the public role or any other roles the user belongs to. For more control, consider creating a custom restricted role with no default visibility, granting access only where needed. If visibility persists, this may be due to how Microsoft Fabric’s SQL endpoint handles permissions, and workspace-level permissions may provide a more effective alternative for restricting access.

Happy to help! If this addressed your concern, marking it as "Accepted Solution" and giving us "kudos" would be valuable for others in the community.

Thank you.

View solution in original post

Bhargava05
Frequent Visitor

@v-sgandrathi  There are no additional permissions to public role or even for the user. So even if i create a custom role, They may still inherit whatever from public role has and still be able to see the metadata right. I even tried revoking and denying view definition to public, which still didnt restrict the user from viewing all the metadata

 

View solution in original post

Hi @Bhargava05 ,

 

Since you have already applied Revoke and Deny view definition to both the specific user and the public role, but the metadata remains visible, this behavior is likely due to the underlying permission model in Microsoft Fabric’s SQL endpoint. Unlike traditional SQL Server, some services—including Fabric—may handle Deny view definition differently or override it in certain scenarios.

As the feature is still in public preview, there may be limitations affecting permission enforcement. We recommend monitoring updates for the general availability release, as this behavior may be addressed in future versions.

If this solution worked for you, kindly mark it as Accept as Solution and feel free to give a Kudos, it would be much appreciated!

Thank you.

View solution in original post

6 REPLIES 6
Bhargava05
Frequent Visitor

@v-sgandrathi  There are no additional permissions to public role or even for the user. So even if i create a custom role, They may still inherit whatever from public role has and still be able to see the metadata right. I even tried revoking and denying view definition to public, which still didnt restrict the user from viewing all the metadata

 

Hi @Bhargava05 ,

 

Since you have already applied Revoke and Deny view definition to both the specific user and the public role, but the metadata remains visible, this behavior is likely due to the underlying permission model in Microsoft Fabric’s SQL endpoint. Unlike traditional SQL Server, some services—including Fabric—may handle Deny view definition differently or override it in certain scenarios.

As the feature is still in public preview, there may be limitations affecting permission enforcement. We recommend monitoring updates for the general availability release, as this behavior may be addressed in future versions.

If this solution worked for you, kindly mark it as Accept as Solution and feel free to give a Kudos, it would be much appreciated!

Thank you.

Bhargava05
Frequent Visitor

Hi @v-sgandrathi thanks for your reply!

 

I did try already revoking/denying view definition permission to the user. And i did try it back right now.

These were the intial permissions, we had on the sql endpoint before revoking or denying. 

Bhargava05_0-1742391156706.png

 

I used REVOKE VIEW DEFINITION ON DATABASE::lakehouse_tst FROM"user" first and then also

DENY VIEW DEFINITION ON DATABASE::lakehouse_tst TO "user", which resulted in 

Bhargava05_1-1742391291630.png

But still the user was able to see the metadata in the database.

 

And also is there a way where i can revoke view definition to all of the users instead of specifying each at a time? Like revoking view definition to public? I did try that as well, but didnt work tho.

Let me know your thoughts!

Would be of great help!!

 

Thanks!

Hi @Bhargava05,

 

The reason the user still sees metadata, even after using REVOKE and DENY VIEW DEFINITION, is likely due to inherited permissions, especially from the public role, which all users are part of by default. Even if you revoke permissions from a specific user, they may still inherit visibility from this role or other implicit grants. To address this, ensure no unwanted permissions remain on the public role or any other roles the user belongs to. For more control, consider creating a custom restricted role with no default visibility, granting access only where needed. If visibility persists, this may be due to how Microsoft Fabric’s SQL endpoint handles permissions, and workspace-level permissions may provide a more effective alternative for restricting access.

Happy to help! If this addressed your concern, marking it as "Accepted Solution" and giving us "kudos" would be valuable for others in the community.

Thank you.

Hi @Bhargava05,

 

I wanted to check in your situation regarding the issue. Have you resolved it? If you have, please consider marking the reply as Accepted solution and give Kudos that helped you. It would be greatly appreciated by others in the community who may have the same question.

Thankyou for using Microsoft Fabric Community Forum!

 

v-sgandrathi
Community Support
Community Support

Hi @Bhargava05,

Thank you for using Microsoft Community Forum.

 

To prevent users from seeing any database objects unless explicitly granted, you need to revoke metadata visibility using the VIEW DEFINITION permission. This ensures users cannot even see the existence of schemas, tables, or columns.
You can refer to the following document for more information:

REVOKE (Transact-SQL) - SQL Server | Microsoft Learn

To further restrict access, you can explicitly deny direct access to specific objects if users were previously granted permission. This ensures they cannot view or query particular tables, even if other permissions are in place.
I’m sharing the DENY SQL link for your idea:

DENY (Transact-SQL) - SQL Server | Microsoft Learn

If you want the user to access specific tables, you need to explicitly grant them permission.
By following these steps, you can ensure that users with read-only access cannot see any database objects unless explicitly granted permission.

Please Accept as solution if this meets your needs and a Kudos would be appreciated.

Regards,
Sahasra.

Helpful resources

Announcements
MarchFBCvideo - carousel

Fabric Monthly Update - March 2025

Check out the March 2025 Fabric update to learn about new features.

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

Find out what's new and trending in the Fabric community.

"); $(".slidesjs-pagination" ).prependTo(".pagination_sec"); $(".slidesjs-pagination" ).append("
"); $(".slidesjs-play.slidesjs-navigation").appendTo(".playpause_sec"); $(".slidesjs-stop.slidesjs-navigation").appendTo(".playpause_sec"); $(".slidesjs-pagination" ).append(""); $(".slidesjs-pagination" ).append(""); } catch(e){ } /* End: This code is added by iTalent as part of iTrack COMPL-455 */ $(".slidesjs-previous.slidesjs-navigation").attr('tabindex', '0'); $(".slidesjs-next.slidesjs-navigation").attr('tabindex', '0'); /* start: This code is added by iTalent as part of iTrack 1859082 */ $('.slidesjs-play.slidesjs-navigation').attr('id','playtitle'); $('.slidesjs-stop.slidesjs-navigation').attr('id','stoptitle'); $('.slidesjs-play.slidesjs-navigation').attr('role','tab'); $('.slidesjs-stop.slidesjs-navigation').attr('role','tab'); $('.slidesjs-play.slidesjs-navigation').attr('aria-describedby','tip1'); $('.slidesjs-stop.slidesjs-navigation').attr('aria-describedby','tip2'); /* End: This code is added by iTalent as part of iTrack 1859082 */ }); $(document).ready(function() { if($("#slides .item").length < 2 ) { /* Fixing Single Slide click issue (commented following code)*/ // $(".item").css("left","0px"); $(".item.slidesjs-slide").attr('style', 'left:0px !important'); $(".slidesjs-stop.slidesjs-navigation").trigger('click'); $(".slidesjs-previous").css("display", "none"); $(".slidesjs-next").css("display", "none"); } var items_length = $(".item.slidesjs-slide").length; $(".slidesjs-pagination-item > button").attr("aria-setsize",items_length); $(".slidesjs-next, .slidesjs-pagination-item button").attr("tabindex","-1"); $(".slidesjs-pagination-item button").attr("role", "tab"); $(".slidesjs-previous").attr("tabindex","-1"); $(".slidesjs-next").attr("aria-hidden","true"); $(".slidesjs-previous").attr("aria-hidden","true"); $(".slidesjs-next").attr("aria-label","Next"); $(".slidesjs-previous").attr("aria-label","Previous"); //$(".slidesjs-stop.slidesjs-navigation").attr("role","button"); //$(".slidesjs-play.slidesjs-navigation").attr("role","button"); $(".slidesjs-pagination").attr("role","tablist").attr("aria-busy","true"); $("li.slidesjs-pagination-item").attr("role","list"); $(".item.slidesjs-slide").attr("tabindex","-1"); $(".item.slidesjs-slide").attr("aria-label","item"); /*$(".slidesjs-stop.slidesjs-navigation").on('click', function() { var itemNumber = parseInt($('.slidesjs-pagination-item > a.active').attr('data-slidesjs-item')); $($('.item.slidesjs-slide')[itemNumber]).find('.c-call-to-action').attr('tabindex', '0'); });*/ $(".slidesjs-stop.slidesjs-navigation, .slidesjs-pagination-item > button").on('click keydown', function() { $.each($('.item.slidesjs-slide'),function(i,el){ $(el).find('.c-call-to-action').attr('tabindex', '-1'); }); var itemNumber = parseInt($('.slidesjs-pagination-item > button.active').attr('data-slidesjs-item')); $($('.item.slidesjs-slide')[itemNumber]).find('.c-call-to-action').attr('tabindex', '0'); }); $(".slidesjs-play.slidesjs-navigation").on('click', function() { $.each($('.item.slidesjs-slide'),function(i,el){ $(el).find('.c-call-to-action').attr('tabindex', '-1'); }); }); $(".slidesjs-pagination-item button").keyup(function(e){ var keyCode = e.keyCode || e.which; if (keyCode == 9) { e.preventDefault(); $(".slidesjs-stop.slidesjs-navigation").trigger('click').blur(); $("button.active").focus(); } }); $(".slidesjs-play").on("click",function (event) { if (event.handleObj.type === "click") { $(".slidesjs-stop").focus(); } else if(event.handleObj.type === "keydown"){ if (event.which === 13 && $(event.target).hasClass("slidesjs-play")) { $(".slidesjs-stop").focus(); } } }); $(".slidesjs-stop").on("click",function (event) { if (event.handleObj.type === "click") { $(".slidesjs-play").focus(); } else if(event.handleObj.type === "keydown"){ if (event.which === 13 && $(event.target).hasClass("slidesjs-stop")) { $(".slidesjs-play").focus(); } } }); $(".slidesjs-pagination-item").keydown(function(e){ switch (e.which){ case 37: //left arrow key $(".slidesjs-previous.slidesjs-navigation").trigger('click'); e.preventDefault(); break; case 39: //right arrow key $(".slidesjs-next.slidesjs-navigation").trigger('click'); e.preventDefault(); break; default: return; } $(".slidesjs-pagination-item button.active").focus(); }); }); // Start This code is added by iTalent as part of iTrack 1859082 $(document).ready(function(){ $("#tip1").attr("aria-hidden","true").addClass("hidden"); $("#tip2").attr("aria-hidden","true").addClass("hidden"); $(".slidesjs-stop.slidesjs-navigation, .slidesjs-play.slidesjs-navigation").attr('title', ''); $("a#playtitle").focus(function(){ $("#tip1").attr("aria-hidden","false").removeClass("hidden"); }); $("a#playtitle").mouseover(function(){ $("#tip1").attr("aria-hidden","false").removeClass("hidden"); }); $("a#playtitle").blur(function(){ $("#tip1").attr("aria-hidden","true").addClass("hidden"); }); $("a#playtitle").mouseleave(function(){ $("#tip1").attr("aria-hidden","true").addClass("hidden"); }); $("a#play").keydown(function(ev){ if (ev.which ==27) { $("#tip1").attr("aria-hidden","true").addClass("hidden"); ev.preventDefault(); return false; } }); $("a#stoptitle").focus(function(){ $("#tip2").attr("aria-hidden","false").removeClass("hidden"); }); $("a#stoptitle").mouseover(function(){ $("#tip2").attr("aria-hidden","false").removeClass("hidden"); }); $("a#stoptitle").blur(function(){ $("#tip2").attr("aria-hidden","true").addClass("hidden"); }); $("a#stoptitle").mouseleave(function(){ $("#tip2").attr("aria-hidden","true").addClass("hidden"); }); $("a#stoptitle").keydown(function(ev){ if (ev.which ==27) { $("#tip2").attr("aria-hidden","true").addClass("hidden"); ev.preventDefault(); return false; } }); }); // End This code is added by iTalent as part of iTrack 1859082