0

I want to authenticate user using Microsoft graph azure (ROPC) but i got some error . I think that there is some issue during azure app setting. all error which i face are given below enter image description here

or when I use other email address then I got "email hidden error" enter image description here

amir tariq
  • 35
  • 1
  • 7
  • Hey, did the suggestion work? do let me know if it solved your problem else share more details so I can troubleshoot. [Help Center - Stack Overflow](https://stackoverflow.com/help/accepted-answer) – RahulKumarShaw Jun 24 '22 at 03:21

2 Answers2

0

Immediately after a successful request, the client should securely release the user's credentials from memory. It must never save them.

POST {tenant}/oauth2/v2.0/token
Host: login.microsoftonline.com
Content-Type: application/x-www-form-urlencoded

client_id=6731de76-14a6-49ae-97bc-6eba6914391e
&scope=user.read%20openid%20profile%20offline_access
&username=MyUsername@myTenant.com
&password=SuperS3cret
&grant_type=password
Bowman Zhu-MSFT
  • 4,776
  • 1
  • 9
  • 10
  • when i create a user flow and select signin using ropc then how can we run it on postman or in laravel controller please guide me or upload an image of postman to run it – amir tariq Jun 22 '22 at 12:10
0

According to your image 1:

AADSTS65001: The user or administrator has not consented to use the application

The error occurs due to not given Grant consent permission to the application.

If your application user needs consent, you have to construct the consent URL

https://login.microsoftonline.com/{tenant-id}/adminconsent?client_id={client-id}

you can solve the issue and add the consent permission in the portal:

Go to azure portal:

AzureAAD->Enterprise App->security->Permission->Click the add grant admin consent for microsoft.

enter image description here

enter image description here

consider the permission of application needs, click the grant admin consent permission if you accept the application's request for certain rights.

According to your image 2:

AADSTS50034: The user account {EmailHidden} does not exist in the domain.onmicrosoft.com

This error occurs due to if your company domain has not been registered as a verified domain within your Azure AD tenant you will get an "invalid user name or password error."

For more information refer this SO thread

RahulKumarShaw
  • 4,192
  • 2
  • 5
  • 11