I tried recently to use the Web Appbuilder 1.2 with Portal 10.3.1. I followed the instructions carefully for registering the appbuilder as an app in the portal and trying to run it afterwards. In fact I tried the procedure several times to make sure that I am not missing something. Each time I get the error:

The portal is setup with IWA. I enter the APP ID of the registered appbuilder, then the browser prompts me and I enter my own credentials. The problem comes up when the following call is made:
........./arcgisportal/sharing/portals/self?f=json&token=wrFh0..................
My guess is that the server is challenging the client with the headers:
- WWW-Authenticate:Negotiate
- WWW-Authenticate:NTLM
but the rest call somehow cannot handle the challenge. If I open the same request in a different tab, then I get the expected json, probably because the browser knows how to handle and respond to the challenge. Is it possible the there is a bug in the appbuilder that makes it not handle properly the built-in windows authentication?
Here is are the details of the failed request:

Any help with this issue would be highly appreciated.
Thanks!