Hello!
My goal is to have one Application that I can access even if I have permission to view only one layer out of many, but if I have access only to one layer, every time I load the page again, I am asked to log in.
I have a web viewer and an app created with Experience Builder where I added two FeatureServices.
Each of these FSs is shared in one group each.
Let's say I share FC1 to Group1 and FC2 with Group 2, different user have access to one of these groups.
The Map viewer and the WebApp are shared with both groups.
When I login with an user account that is member of all groups, the viewer shows everything correctly.
When I login with an user account that has access to one group only, I see that the layer that is not shared gives an error (an error occurred loading this layer) ---> I was expecting this and I can live with this error.
The problem is that every time that I access this Web Application or every time that I load the page again, I am asked to login, after that, I have access to the map.
I would like to have a seamless behavior. Any thoughts about a possible workaround?
Thanks!
The short answer is "no", unfortunately. The way you're configuring things, that prompt is always going to show up.
I have seen users in this situation use some automation to keep two nearly identical apps in sync with one another. Imagine you have one app / map designated as the "primary" ones, the others as "secondary". When you make an edit to the first map or app, a script can copy out the JSON, alter the layer ID, and push the altered JSON to the corresponding secondary item.
It's a bit of technical work to set up, but it would get around the login prompt.
If it's embedded apps in your Experience Builder then you'd want to check out how to skip the login as shown here https://doc.arcgis.com/en/experience-builder/latest/configure-widgets/embed-widget.htm - 'share authentication' heading at the bottom of the page.