[Inquiry] Entra ID Authentication and RLS Configuration for DAB MCP Server #3456
-
|
We are currently validating a configuration where an in-house AI agent acts as an MCP client and DAB on Azure Container Apps acts as an MCP server, accessing Azure SQL Database via Entra ID authentication. The goal is to apply Row-Level Security (RLS) based on individual user identity. We would appreciate your confirmation on the following points. ■ Reference Documents ■ Confirmation of Understanding [Q2] Authentication Configuration for MCP Server In the Command-Line example provided in ②, is it correct that the following values should be set using the DAB app's Application ID and Tenant ID? [Q3] RLS Implementation Is it correct that RLS is applied by passing the oid claim from the JWT to SQL via SESSION_CONTEXT, and matching it against the corresponding column in the table? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
|
Hi @Koro110, Thank you for your question. [Q1]: Yes. Both app registrations will be needed if your MCP client also authenticates with Entra before reaching out to the SQL MCP Server (in DAB). [Q2]: Yes that is correct. The resulting configuration should be as per the example here: https://learn.microsoft.com/en-us/azure/data-api-builder/concept/security/authenticate-entra?tabs=bash#resulting-configuration [Q3]: That is true. RLS feature uses SESSION_CONTEXT. |
Beta Was this translation helpful? Give feedback.
Hi @Koro110,
Thank you for your question.
[Q1]: Yes. Both app registrations will be needed if your MCP client also authenticates with Entra before reaching out to the SQL MCP Server (in DAB).
[Q2]: Yes that is correct. The resulting configuration should be as per the example here: https://learn.microsoft.com/en-us/azure/data-api-builder/concept/security/authenticate-entra?tabs=bash#resulting-configuration
[Q3]: That is true. RLS feature uses SESSION_CONTEXT.
Additionally, if you also need a "Pass Through" authentication i.e. the MCP client is also a user in SQL, you could use the On behalf of feature introduced in DAB 2.0.0-rc currently in preview. In addition to the RLS feature, OBO allo…