13,734 questions
Getting error Microsoft.Identity.Client.MsalUiRequiredException
Anonymous
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();
Microsoft Security | Microsoft Graph
Sign in to answer