why chaning to layer private setting doesn't work

309
5
04-21-2021 10:33 AM
yiqunchen1
New Contributor

hi,

I changed the layer access setting to private. It asks for sign in when I open one application which needs to access the layer I changed setting. This is what I expected. But it complains that username/passwd doesn't match even though what I entered must be right.

Please sign in to access the item on ArcGIS Online (item)

The username or password you entered is incorrect.

Please sign in to access the item on ArcGIS Online (item)
 
The username or password you entered is incorrect.
 
Username:
 
Password:
 
OKCancel
 

What could possible go wrong? The only thing I changed is change from public to private for that layer so no need to post the real script.

Layer access (sharing)

These settings determine who can access this layer.

People with access

Private (authentication required)

Public (authentication not required)

 

Thanks!

0 Kudos
5 Replies
KenBuja
MVP Honored Contributor

Is your data on an organizational site (org.maps.arcgis.com) or the basic arcgis.com site?

0 Kudos
YiqunChen
New Contributor II

I do have arcgis developer accounts for myself and for my organization. The one I am talking about is from my arcgis developer account. I also have another account at arcgis online (to have 3 accounts just occurred over time). I tried all three of them but none worked. I assume that the account from arcgis online should be right since it says: Please sign in to access the item on ArcGIS Online (item). Am I right?

0 Kudos
KenBuja
MVP Honored Contributor

When I have to access private data on my organization site in a JS app, I have to use OAuthentication to correctly log onto the site.

0 Kudos
YiqunChen
New Contributor II

Thanks! I will try OAuthentication as I never used it before. I thought that I set my layer to be private and then adding a API key will allow me to access my own layer. It looks like it still asks for authentication even if you apply API key. In other words, you are always required to log in as long as you change the layer access setting to private. Hope that I understand the document right.

 

0 Kudos
KenBuja
MVP Honored Contributor

Test the sample to see if you can log in and see your items.

0 Kudos