Getting error Microsoft.Identity.Client.MsalUiRequiredException

Hamendra Kumar (HCL Technologies Ltd) 0 Reputation points Microsoft Vendor
2024-05-08T10:05:43.12+00:00

Hi Team,

I am getting below error while trying to generate the token by using below code

Microsoft.Identity.Client.MsalUiRequiredException: 'AADSTS50076: Due to a configuration change made by your administrator, or because you moved to a new location, you must use multi-factor authentication to access '00000003-0000-0000-c000-000000000000'. Trace ID: 43e876a2-7f8d-4631-9b4d-8c8c875c8900 Correlation ID: ab584317-4e37-41ce-96c1-8610f6bd5293 Timestamp: 2024-05-08 09:40:05Z'

result = await app.AcquireTokenByUsernamePassword(

scopes: scopes,

username: this._loginId,

password: this._loginPassword

).ExecuteAsync();

User's image

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
12,293 questions
0 comments No comments
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.