I'm having problems deleting an item in Portal for ArcGIS. It is delete protected so I can't delete using the UI. I am unable to change the delete protection because the edit button is also disabled. I used ArcGIS Online Assistant and tried to change the delete protection from there but the change from true to false wouldn't actually take. It just kept reverting back. I tried to find the xml or json file in the item ID folder on the Portal server itself, but I couldn't find the delete protection attribute. I'm hesitant to just outright delete the item ID folder itself because I don't know if the item ID is registered anywhere else (a user's item list for instance). Could anyone instruct me on a thorough way to force delete an item from Portal for ArcGIS?
This method works like a dream! Thank you!
Using the ArcGIS Online Assist tool:https://ago-assistant.esri.com/
Log into the Portal/account that owns the items that are phantoms.
Next, click on the item ID, preferably on a new window
Next, it should take you to the item you couldn't access before to delete through normal delete procedure.
You may have to repeat 5 to 10 times as the phantoms often have duplicates.
In my case, once the phantoms were all deleted, it let me successfully delete the user account that "OWNED ITEMS" previously.
Hello all,
Similar problem with my portal. After re-federation, I have an orphaned dataset, which is delete protected. Online Assist (cool tool btw) cannot help me, the json url is linked to an old webadaptor name and details page will not display, and it will not save changes when editing the JSON file directly in Online Assist.
Also tried the esri workaround. Stopped portal thru my windows server 'Services', deleted the file in the Portal content directory, restarted, annnnd the stupid file is still staring up at me in the online Content. But now it doesn't give a delete protection error, it just thinks forever when any request is made to the layer.
Not the worst problem to have with Portal, but it vex's me greatly, my Portal must be clean and perfect!
Thank you for any suggestions
Hi, I have had success with a method to remove 'orphaned items' from Portal.
My Infrastructure: Portal 10.6.1 with Federated AGS.
See: Delete Item—ArcGIS REST API: Users, groups, and content | ArcGIS for Developers . As noted in the Help this procedure only works at 10.6.1 and applies to Portal or AGO. My example was with our Portal.
1. Format the URL to perform the Post function in the browser. This was a little tricky but i got it to work. So what i did was start with the convention used to perform a (similar simpler) Post call such as 'Root Post call' (Root—ArcGIS REST API: Users, groups, and content | ArcGIS for Developers ). Once you get that one working move onto the required 'Delete Item' Post request (link above).
2. Source the 'Item ID' of the feature you want to 'delete' from your Portal (the alphanumeric code number of the item in Portal).
3. Login as an Admin (Site Admin) when prompted.
4. I checked the tick box 'Force delete' when prompted.
5. Vwella (Fingers crossed)!
Hope this helps.
Nice angle, but didn't work for my 10.6 Portal/Server. The url and physical path no longer exist. Anybody think i could re-Generate the feature from rest services, then get it happily deleted?
Error snip below:
I've been having similar problems. What I've learned is that removing the service from (a federated) server does not remove it from portal. You must remove it from both locations. Not the easiest workflow but oh well.
The exact error I get in Portal is:
Unable to reach the server where the service is. Consider using calling deleteItem with options = { 'force' : true } if the server won't be available anymore.
I found i was able to delete the items using the REST API as found in this thread here. So you're not really having to format the syntax, you're working with the Portal's rest interface.
For example, if you navigate to:
https://portalname/portal/sharing/rest/content/users/<username>/ you can see all the content and their IDs. you can then click on the ID title and then simply use the 'Delete Item' interface with the 'Force Deletion' option checked on.
This works in a more interactive way IMO although not being able to delete via Portal is clunky at best.
On a side note: this interface still isn't letting me delete orphaned items. I need to connect with my IT provider to get access to the location of the portal content directory to try to do this manually (this is an azure deployment so config and storage locations are not a simple file explorer procedure).
Let us know if that helps.
Ill go through all these threads and retry Zachary. Thanks for the help, I will update
Success! But in a round about way.
So I hooked up with my REST API. I was able to navigate to the folder and orphan item, then try the deleteitems command with my orphan ID in the box. Its takes me to a blank page in the API with only one 'rest API' link that takes me to the esri documentation, dead end. But very nice to access content this way.
Next, I went back to my Portal Content page where the orphan Item was located, clicked the checkbox, then the 'change owner' option. Moved the owner to a different portal user, then was successful deleting the item through the REST API under that user name. (maybe it would've worked through Portal Content also)
Clean Portal!
Sorry previous reply was for online assisstant. I tried the REST API method Simon, I think I have my urls correct, error snip below: The webadaptor is named 'Portal', The old webadaptor the item references is 'PortalWA'
Hi Drew,
I've got a similar issue that you we're experiencing where I've orphaned Portal Items that point to and old webadaptor address. I can't delete them as them as the item details never loads as it is looking for a URL that no longer exists. If I use the rest to try and delete I get the message Item does not exist or is inaccessible. Can you let me know the work flow you used to remove these items?