New Year Sale 2026! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Microsoft AZ-204 Exam - Topic 7 Question 17 Discussion

Actual exam question for Microsoft's AZ-204 exam
Question #: 17
Topic #: 7
[All AZ-204 Questions]

Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might meet the stated goals. Some question sets might have more than one correct solution, while others might not have a correct solution.

After you answer a question in this section, you will NOT be able to return to it. As a result, these questions will not appear in the review screen.

You develop Azure solutions.

You must grant a virtual machine (VM) access to specific resource groups in Azure Resource Manager.

You need to obtain an Azure Resource Manager access token.

Solution: Run the Invoke-RestMethod cmdlet to make a request to the local managed identity for Azure resources endpoint.

Does the solution meet the goal?

Show Suggested Answer Hide Answer
Suggested Answer: A

Get an access token using the VM's system-assigned managed identity and use it to call Azure Resource Manager

You will need to use PowerShell in this portion.

In the portal, navigate to Virtual Machines and go to your Windows virtual machine and in the Overview, click Connect.

Enter in your Username and Password for which you added when you created the Windows VM.

Now that you have created a Remote Desktop Connection with the virtual machine, open PowerShell in the remote session.

Using the Invoke-WebRequest cmdlet, make a request to the local managed identity for Azure resources endpoint to get an access token for Azure Resource Manager.

Example:

$response = Invoke-WebRequest -Uri 'http://169.254.169.254/metadata/identity/oauth2/token?api-version=2018-02-01&resource=https://management.azure.com/' -Method GET -Headers @{Metadata='true'}


https://docs.microsoft.com/en-us/azure/active-directory/managed-identities-azure-resources/tutorial-windows-vm-access-arm

Contribute your Thoughts:

0/2000 characters
Laila
4 months ago
Not sure if that's the best approach, sounds a bit off.
upvoted 0 times
...
Jesus
4 months ago
Totally agree, Invoke-RestMethod is solid for this!
upvoted 0 times
...
Bettye
4 months ago
Wait, can you really use the local managed identity like that?
upvoted 0 times
...
Shawnda
5 months ago
I disagree, I think there's a better method.
upvoted 0 times
...
Kayleigh
5 months ago
Yes, that's the right way to get the token!
upvoted 0 times
...
Lyndia
5 months ago
I feel like this solution aligns with what we learned about managed identities, but I wonder if there are other methods we should consider.
upvoted 0 times
...
Julene
5 months ago
I'm a bit confused about the specifics of the local managed identity endpoint. Is it definitely the right one for this scenario?
upvoted 0 times
...
Bette
5 months ago
I remember practicing a similar question where we had to use managed identities, and I think this approach could work.
upvoted 0 times
...
Tracie
5 months ago
I think using Invoke-RestMethod to get the access token sounds right, but I'm not entirely sure if it's the only way to do it.
upvoted 0 times
...
Lonny
5 months ago
I feel pretty confident about this one. Personas are a great way to model real user behavior, so we should be able to use them to create a more accurate performance testing scenario.
upvoted 0 times
...
Kristian
5 months ago
I feel pretty confident about this one. Increasing flexibility with risks that require a response seems like the right approach.
upvoted 0 times
...
Cecil
5 months ago
Wait, what does sensitivity mean again? I'm confused about whether this means ALL clients or just a percentage...
upvoted 0 times
...
Ty
5 months ago
Okay, let me think this through step-by-step. The key is to focus on the details about the Huawei server.
upvoted 0 times
...
Flo
5 months ago
Hmm, this seems a bit tricky. I'll need to make sure I understand the requirements fully before deciding on a solution. Correlating the device data based on the identifier is an important part.
upvoted 0 times
...
Felix
5 months ago
Wait, does it guarantee that the certificate is not expired too? I remember studying something about validity periods.
upvoted 0 times
...

Save Cancel