Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Microsoft DP-800 Exam - Topic 2 Question 13 Discussion

Posted by Alpha on Sep 27, 2026 at 01:31 AM

You have an Azure SQL database named SalesDB on a logical server named sales-sql01.

You have an Azure App Service web app named OrderApi that connects to SalesDB by using SQL authentication.

You enable a user-assigned managed identity named OrderApi-Id for OrderApi.

You need to configure OrderApi to connect to SalesDB by using Microsoft Entra authentication. The managed identity must have read and write permissions to SalesDB.

Which Transact-SQL statements should you run in SalesDB?

Suggested Answer: C

For an Azure App Service using a user-assigned managed identity to connect to Azure SQL Database with Microsoft Entra authentication, the required database-side step is to create a database user from the external provider, then grant the needed database roles. Microsoft's Azure SQL documentation for managed identities states that to let a managed identity access the target database, you create a SQL user for that identity by using:

CREATE USER [<identity-name>] FROM EXTERNAL PROVIDER;

and then assign the appropriate roles.

That makes db_datareader and db_datawriter the right role grants here, because the requirement says the identity must have read and write permissions to SalesDB.

The other options are incorrect:

A uses CREATE LOGIN ... FROM EXTERNAL PROVIDER, which is not the right choice for this Azure SQL Database scenario; the documented pattern is to create a database user from the external provider.

B and D create SQL-authentication principals with passwords, which does not meet the Microsoft Entra managed-identity requirement.

D also grants sysadmin, which is a server-level overgrant and not appropriate for the stated read/write requirement.


Get Premium DP-800 Questions as Interactive Web-Based Practice Test or PDF Real Exam Format Detailed Explanations Instant Access Get Your Practice Test
11 comments · newest first
MA
Marion
I disagree, I think A is better since it creates a login.
PA
Pauline 5 days ago
Option C is the way to go! Managed identities need a user created from external provider.
ZO
Zona 10 days ago
A and D don’t fit the managed identity scenario at all.
CE
Celia 15 days ago
Definitely going with C, it makes the most sense!
MA
Marget 20 days ago
Wait, can you really use a password with managed identities?
SH
Shakira 26 days ago
I think A is better, but C seems solid too.
JO
Joanne 1 month ago
Option C is the right choice for managed identities!
LA
Layla 1 month ago
I’m confused about the difference between creating a login and a user here. I thought managed identities required a user, but I might be mixing things up.
DA
Dana 1 month ago
I feel like option C is the right choice because it specifically mentions creating a user from the external provider, which aligns with managed identities.
CO
Corazon 2 months ago
I remember practicing a similar question where we had to assign roles, but I can't recall if we should use CREATE USER or CREATE LOGIN in this case.
MI
Michell 2 months ago
I think we need to create a user from the external provider since we're using managed identity, but I'm not entirely sure if it's option A or C.
0/2000 characters

Save Cancel