Could someone help me, how can I get Login User Profile Information/accessToken without manual Interaction with User
Asked
Active
Viewed 70 times
-1
-
Because authentication is not enabled maybe? – Kalyan Krishna Jun 28 '20 at 10:54
1 Answers
-1
You can use ROPC Flow to get the token which helps in authenticate to without manual Interaction with User.
Here is the request for your reference:
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
Note: Microsoft recommends you do not use the ROPC flow. In most scenarios, more secure alternatives are available and recommended. This flow requires a very high degree of trust in the application, and carries risks which are not present in other flows. You should only use this flow when other more secure flows can't be used.
Based on the above note it advises using client credential flow. Please refer similar question with client credential flow that may help you.If you use client credential flow then user login itself is not required.
Hari Krishna
- 2,372
- 2
- 11
- 24
-
Why suggest a non-recommend flow like ROPC for a question that's not even clear? – Kalyan Krishna Jun 28 '20 at 10:49