Valid MS-600 Dumps shared by ExamDiscuss.com for Helping Passing MS-600 Exam! ExamDiscuss.com now offer the newest MS-600 exam dumps, the ExamDiscuss.com MS-600 exam questions have been updated and answers have been corrected get the newest ExamDiscuss.com MS-600 dumps with Test Engine here:
You develop a web API named WebApi1. When validating a token received from a client application, WebApi1 receives a MsalUiRequiredException exception from Azure Active Directory (Azure AD). You need to formulate the response that WebApi1 will return to the client application. Which HTTP response should you send?
Correct Answer: D
Explanation The HyperText Transfer Protocol (HTTP) 412 Precondition Failed client error response code indicates that access to the target resource has been denied. This happens with conditional requests on methods other than GET or HEAD when the condition defined by the If-Unmodified-Since or If-None-Match headers is not fulfilled. In that case, the request, usually an upload or a modification of a resource, cannot be made and this error response is sent back. MsalUiRequiredException The "Ui Required" is proposed as a specialization of MsalServiceException named MsalUiRequiredException. This means you have attempted to use a non-interactive method of acquiring a token (e.g. AcquireTokenSilent), but MSAL could not do it silently. this can be because: * you need to sign-in * you need to consent * you need to go through a multi-factor authentication experience. The remediation is to call AcquireTokenInteractive try { app.AcquireTokenXXX(scopes, account) WithYYYY(...) ExecuteAsync() } catch(MsalUiRequiredException ex) { app.AcquireTokenInteractive(scopes) WithAccount(account) WithClaims(ex.Claims) ExcecuteAsync(); }