exam questions

Exam AZ-500 All Questions

View all questions & answers for the AZ-500 exam

Exam AZ-500 topic 5 question 28 discussion

Actual exam question from Microsoft's AZ-500
Question #: 28
Topic #: 5
[All AZ-500 Questions]

You have an Azure subscription named Sub1 that contains the resources shown in the following table.

You need to ensure that you can provide VM1 with secure access to a database on SQL1 by using a contained database user.
What should you do?

  • A. Enable a managed identity on VM1.
  • B. Create a secret in KV1.
  • C. Configure a service endpoint on SQL1.
  • D. Create a key in KV1.
Show Suggested Answer Hide Answer
Suggested Answer: A 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
benito_nepomuceno
Highly Voted 4 years, 1 month ago
A. Enable a managed identity on VM1.
upvoted 39 times
rgullini
4 years ago
Isn´t it the B option as the request is tosecure access to a database on SQL1 by using a contained database user?
upvoted 4 times
rgullini
4 years ago
Dismiss my comment. VM and keyvault should be in the same region.
upvoted 4 times
...
...
macka2005
2 years, 4 months ago
Why can't Exam topics sort their answers out for once and for all
upvoted 10 times
...
maxstv
4 years, 1 month ago
Agree here. A. Enable a managed identity on VM1. https://docs.microsoft.com/en-us/azure/active-directory/managed-identities-azure-resources/tutorial-windows-vm-access-sql
upvoted 11 times
B0ris
3 years, 8 months ago
Nope. Then you're not giving access using a contained database user.
upvoted 5 times
pentium75
9 months ago
Thought so too but that is wrong, "contained database user" ist just a user in the database, does NOT say that he authenticates with SQL authentication.
upvoted 1 times
...
...
...
Malikusmanrasheed
1 year, 10 months ago
Gpt agrees
upvoted 1 times
...
...
Super_Pun
Highly Voted 4 years, 1 month ago
Given answer is correct The question is "secure access to a database on SQL1 by using a contained database user" by using contained database user... it means no need to enable manage identity
upvoted 15 times
sureshatt
4 years, 1 month ago
I disagree. contained database user does not mean/or nothing to do with managed identity. Contained database user can be mapped to Azure AD identity. "However, using Azure Active Directory authentication with SQL Database and Azure Synapse requires using contained database users based on an Azure AD identity. A contained database user does not have a login in the master database, and maps to an identity in Azure AD that is associated with the database. The Azure AD identity can be either an individual user account or a group." https://docs.microsoft.com/en-gb/azure/key-vault/general/rbac-guide Therefore, a managed identity should also be possible to mapped to a contained user similar to a user identity in azure ad.
upvoted 6 times
sureshatt
4 years, 1 month ago
See https://docs.microsoft.com/en-us/azure/active-directory/managed-identities-azure-resources/tutorial-windows-vm-access-sql "Create a contained user in the database that represents the VM's system assigned identity"
upvoted 5 times
...
...
...
pentium75
Most Recent 9 months ago
Selected Answer: A
Was misled by the term "contained database user", this does simply refer to a database user but it does NOT say anything about the authentication method. A "contained database user" can authenticate via SQL authentication OR Windows-integrated/EntraID.
upvoted 1 times
...
bxlin
11 months, 2 weeks ago
Selected Answer: B
For a contained database user, store secret in KV.
upvoted 1 times
...
fireboysz
1 year, 1 month ago
given answer is correct, it says contained database users, means not using AAD but SQL db user, this user inside SQL DB need a secret
upvoted 1 times
...
brooklyn510
1 year, 3 months ago
On exam 1/2/24
upvoted 4 times
...
rosef
1 year, 5 months ago
Selected Answer: A
Hello, We need to use a managed identity because to use key or secret it has to be in the same region. In order to make sure the encryption secrets don't cross regional boundaries. ( the question answer below).
upvoted 1 times
...
TheProfessor
1 year, 6 months ago
Why the correct answer is chosen B ?
upvoted 1 times
...
ESAJRR
1 year, 7 months ago
Selected Answer: A
A. Enable a managed identity on VM1.
upvoted 2 times
...
zellck
1 year, 12 months ago
Selected Answer: A
A is the answer. https://learn.microsoft.com/en-us/azure/active-directory/managed-identities-azure-resources/tutorial-windows-vm-access-sql
upvoted 3 times
...
majstor86
2 years, 1 month ago
Selected Answer: A
A. Enable a managed identity on VM1.
upvoted 4 times
...
tutonata
2 years, 2 months ago
Selected Answer: A
See https://learn.microsoft.com/en-us/sql/relational-databases/security/contained-database-users-making-your-database-portable?view=sql-server-ver16#contained-database-user-model "For SQL Database and Azure Synapse Analytics, since the database name is always required in the connection string, no changes are required to the connection string when switching from the traditional model to the contained database user model. For SQL Server connections, the name of the database must be added to the connection string, if it is not already present." That means that we don't have to store anything in a KV and seen it provides seamless authN with AAD a managed identity is the anwer.
upvoted 1 times
...
ltjones12
2 years, 4 months ago
@macka2005 very disappointing. There are so many old and outdate questions on this site, and nobody seems to be managing it or updating it.
upvoted 2 times
...
Ajdlfasudfo0
2 years, 4 months ago
https://learn.microsoft.com/en-us/azure/active-directory/managed-identities-azure-resources/tutorial-windows-vm-access-sql exactly describes it
upvoted 2 times
...
Muaamar_Alsayyad
2 years, 6 months ago
Selected Answer: A
Answer is A for sure
upvoted 1 times
...
somenick
2 years, 6 months ago
Selected Answer: A
https://learn.microsoft.com/en-us/azure/active-directory/managed-identities-azure-resources/tutorial-windows-vm-access-sql
upvoted 1 times
...
JakeCallham
2 years, 7 months ago
Selected Answer: A
So its confusing in regards to contained. What happens when you set a managed identity in sql? It will create the user in sys.principals and it will calculate the SID based on the origin. For exaple if you have a user assigned identity, its the object Id or when sing sql data package > 3.0 its client id. When suing system assigned identity its using the name and calculates the SID. if you use SQL Management Studio it will do the sid calculation for you. Anyway, the keyvault doesnt make sense due to different RG. But is we store a connectionstring in keyvault that is using a contained user, it could work. Not the most secure way btw.. So now the question MI or service endpoint? Service endpoint is not enough, MI will work although the question is kind of messed up.
upvoted 2 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago