0

I am trying to clear credentials to a WMS connection in Arc. According to the Arc help files, I must import said credentials so I can direct the code on what to clear. I cannot narrow down where to find the path for ImportCredentials method in the below snippet:

secured_credentials = arcpy.ImportCredentials([r"C:\Project\SecuredServices.ags"]) 

aprx = arcpy.mp.ArcGISProject(r"C:\Project\USA.aprx")

m = aprx.listMaps()[0]

Was this path housed somewhere when I fist connected to the server in Arc?

2
  • The .ags is made from within the app (ArcGIS Pro or ArcMap). Since you're using Pro, these files are generally created in the same folder as the project. (but you can make them anywhere). Your best bet is to just do a search in Explorer for *.ags and see what comes up.
    – KHibma
    Commented Aug 2, 2023 at 20:00
  • Or are you saying that you've brought a service in from your Portal and you're trying to clear that connection. That Portal connection is not the same as .ags connection, which is a connection made directly to a Server
    – KHibma
    Commented Aug 2, 2023 at 20:01

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.