exam questions

Exam AZ-203 All Questions

View all questions & answers for the AZ-203 exam

Exam AZ-203 topic 6 question 12 discussion

Actual exam question from Microsoft's AZ-203
Question #: 12
Topic #: 6
[All AZ-203 Questions]

HOTSPOT -
You are developing an Azure App Service hosted ASP.NET Core API app by using C#. The API app will allow users to authenticate by using Twitter and Azure
Active Directory (Azure AD).
Users must be authenticated before calling API methods. You must log the user's name for each method call.
You need to configure the API method calls.
Which values should you use? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.
Hot Area:

Show Suggested Answer Hide Answer
Suggested Answer: Explanation
Box 1: Authorize -
Box 2: X-MS-CLIENT-PRINCIPAL-NAME
App Service passes user claims to your application by using special headers. External requests aren't allowed to set these headers, so they are present only if set by App Service. Some example headers include:

X-MS-CLIENT-PRINCIPAL-NAME -

X-MS-CLIENT-PRINCIPAL-ID -
Here's the set of headers you get from Easy Auth for a Twitter authenticated user:
{
"cookie": "AppServiceAuthSession=Lx43...xHDTA==",
...
"x-ms-client-principal-name": "evilSnobu",
"x-ms-client-principal-id": "35....",
"x-ms-client-principal-idp": "twitter",
"x-ms-token-twitter-access-token": "35...Dj",
"x-ms-token-twitter-access-token-secret": "OK3...Jx",
}
References:
https://docs.microsoft.com/en-us/azure/app-service/app-service-authentication-how-to

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
Daltonic75
Highly Voted 5 years, 3 months ago
Options: https://html2-f.scribdassets.com/8n8ya0pvi87d2upg/images/18-dec8212607.jpg
upvoted 20 times
...
dancsita
Most Recent 4 years, 4 months ago
Given answer is correct
upvoted 2 times
...
TalesFromEarth
4 years, 11 months ago
Why is it X-MS-CLIENT-PRINCIPAL-NAME and not X-MS-CLIENT-PRINCIPAL-ID?
upvoted 2 times
rrongcheng
4 years, 11 months ago
"You must log the user's name for each method call."
upvoted 9 times
...
...
Raevex
4 years, 11 months ago
X-MS-CLIENT-PRINCIPAL-NAME contains the human-readable name of the current user or the username of the current user. X-MS-CLIENT-PRINCIPAL-IDP contains the name of the identity provider that was used to authenticate this user. In this case, it’s microsoftaccount meaning that we used a Microsoft Account (MSA) to create this session.
upvoted 2 times
...
andreiyfrag
5 years, 3 months ago
Options: Q8: https://www.academia.edu/40833803/Pass_AZ-203_Exam_with_Dumps_Questions
upvoted 2 times
...
purav1009
5 years, 3 months ago
Options on page 18: https://www.academia.edu/40833803/Pass_AZ-203_Exam_with_Dumps_Questions
upvoted 2 times
...
purav1009
5 years, 4 months ago
Options please!
upvoted 1 times
gunencali
4 years, 6 months ago
Options: https://freedumps.certqueen.com/wp-content/uploads/2020/06/image076-3.png
upvoted 5 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 ...