I'm working on a WAB app that is using a web map that I have shared with everyone. The web map contains a feature layer that I have only shared with a particular group, which I have made myself a member of. When I launch the application locally (via WAB), the web map is automatically added and includes the feature layer (I assume it's using ADFS?). If I take myself out of the group and launch the application locally, I get a dialog that says the layer cannot be added to the map (I'd like this dialog to just not appear at all but that's further down the road). I am not prompted to sign in to ArcGIS Online to access the item, I just click "ok" and the map ends up loading without that layer.
When I deploy the application to a web server and run it, I am prompted to sign in to access the item on ArcGIS Online whether I am in the group or not. I've tried every variation of username/password I can think of and I can not figure out what username and password it is looking for. It seems that it should be the same credentials that are used when I use ADFS to log in to ArcGIS Online? Anyway, I basically can only "cancel" and then all the layers except for the group shared layer load up.
Am I missing a step somewhere? I have set up a proxy and believe I have it working. Not sure if I might need to register the app in AGOL? Not sure what the serverURL might have to look like, in proxy.config, if I need to use a proxy. I'd appreciate any thoughts or links that I might refer to that might help me move along or better understand this.
Please use .net proxy which will help to access secure layers.
Here is the blog link to help you to add proxy on your application:
I had set up .net proxy and had registered the application at developers.arcgis.com. My issue initially was that I was trying to use the application's AGOL itemId for the appId attribute in the WAB application config.json.
I was further confused because I had registered the application at developers.arcgis.com and didn't notice getting an appId but rather I got a ClientID. When I used the ClientID in the appId section of the application config.json, things worked as expected.
I later noticed in AGOL, when looking at the registered info for the application in application setting, that the appID in AGOL is the same as the ClientID at developers.arcgis.com. I didn't realize appID and ClientID are the same in this context.
I still wasn't able to find a username/password combination that worked so I contacted support. After a bit of troubleshooting with them, we learned the username is case sensitive.