
Hello Experts,
I am trying to get Access Tokens and Refresh Tokens from Azure Active Directory by following Dynamics 365 Online Authenticate with User Credentials and achieved successfully. Now I have enabled MFA for the user, and when I pass the 'App Password' to get the token, I get the below error
The remote server returned an error: (400) Bad Request.
{"error":"invalid_grant","error_description":"AADSTS50126: Invalid username or password.\r\nTrace ID: 6ba62672-ed0f-47a1-84bf-4aa5fee24b00\r\nCorrelation ID: a1d446b9-438b-4652-be86-1ddd07bbf90d\r\nTimestamp: 2019-08-20 12:29:25Z","error_codes":[50126],"timestamp":"2019-08-20 12:29:25Z","trace_id":"6ba62672-ed0f-47a1-84bf-4aa5fee24b00","correlation_id":"a1d446b9-438b-4652-be86-1ddd07bbf90d","error_uri":"">login.microsoftonline.com/error
I looked around for a solution but didn't get it.
How can I get the tokens when MFA is enabled for user?
Thanks!