0
votes

We are new to O365 Authentication and trying to authenticate the user.

Here i am getting this error while trying to login with, office 365.

Create app in active directory add app id and return urls in app, and this is the document I followed, https://blog.xamarin.com/put-adal-xamarin-forms/

here is the error we are getting,

AADSTS70002: The request body must contain the following parameter: 'client_secret or client_assertion' Trace ID: e580114e-2dd9-4cc4-b903-6cef743a2900 Correlation ID: 6e58ff9d-bea4-4ad3-9fe3-e27c92fc9597 Timestamp: 2018-12-05 12:51:23Z

{System.Net.Http.HttpRequestException: Response status code does not indicate success: 401 (Unauthorized). ---> Microsoft.IdentityModel.Clients.ActiveDirectory.AdalException: {"error":"invalid_client","error_description":"AADSTS70002: The request body must contain the following parameter: 'client_secret or client_assertion'\r\nTrace ID: e580114e-2dd9-4cc4-b903-6cef743a2900\r\nCorrelation ID: 6e58ff9d-bea4-4ad3-9fe3-e27c92fc9597\r\nTimestamp: 2018-12-05 12:51:23Z","error_codes":[70002],"timestamp":"2018-12-05 12:51:23Z","trace_id":"e580114e-2dd9-4cc4-b903-6cef743a2900","correlation_id":"6e58ff9d-bea4-4ad3-9fe3-e27c92fc9597"}: Unknown error --- End of inner exception stack trace ---}

1
From the error ,that may miss some info when request.You can try the OfficeDev GitHub sample: github.com/OfficeDev/XamarinAndroidO365 to test and check the problem.Junior Jiang
As per that example, we are passing appid and redirect url, the error is more talking about, client_secret or client_assertion, which we don't have for appAfsara
OK , trying to Change to native client.You can refer to this link. stackoverflow.com/questions/28580848/…Junior Jiang
Yeah, Working fine with Native client appAfsara

1 Answers

0
votes

Ok ,Maybe you have registered your app as a confidential client (web app or web api).

You cannot authenticate with username and password when the app is a confidential client. Only public clients, sometimes known as native clients, can do U/P authentication.

Trying to Change to native client.

Refer to this link to try