question

StefanGavrilas-3938 avatar image
1 Vote"
StefanGavrilas-3938 asked ·

Unable to login via SSO while using WebView

Hi there. I am attempting to login to a website using SSO (let's say https://account.box.com/login) using my Microsoft account. Using a plain WebView, v1803.

However, I receive the following error : "AADSTS900561: The endpoint only accepts POST requests. Received a GET request" (please see below screenshot for more details).

alt text

Edit : After investigating a little, I've noticed that when logging in to Microsoft, it does a few requests (3 or 4 POSTs) and each response tries to set cookies - could it be that the cookies cannot be set?

Would you be able to advise?

Thank you kindly.

uwpuwp-xaml
webviewerr.png (797.3 KiB)
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

StefanGavrilas-3938 avatar image
0 Votes"
StefanGavrilas-3938 answered ·

Hi Roy, Thank you, we identified the issue as being a view-model property triggering re-navigation to the same URL. We have fixed the issue. Thank you for your answer and putting us on the right track. PS : I was referring to target version 1803.

· Share
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

RoyLi-MSFT avatar image
0 Votes"
RoyLi-MSFT answered ·

Hello,

Welcome to Microsoft Q&A!

I made a sample to test the behavior you said. Here is the result: alt text From the image, you could see that the login function works correctly in my test. All the code is in the image. The target version is Build 1803 and the current OS version is 1903.

When you said v1803, what do you mean? Target version or the OS version?

Have you tried to sign in the website using Edge? Will it gave the same issue?


capture.png (144.6 KiB)
· Share
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.