Esri / Esri/arcgis-python-api

Data Store Database Password Update via Portal

Open
#2,527 4 comments 0 reactions 1 assignee Claimed by @kgalliher View on GitHub
bug
Dominant language
Python
Stars
2.2k
Forks
1.2k
Avg merge
2h 40m
Merged PRs (30d)
2

Description

**Describe the bug**
The following script works for registered databases, as long as they have not been created as an item in Portal. https://support.esri.com/en-us/knowledge-base/how-to-programmatically-update-a-password-change-in-an--000022551. If a Portal item exists, management is required via the Portal item rather than arcgis/admin/data/item/enterpriseDatabases//edit which returns "The data store item can only be managed via Portal". Following the steps in the KB, ds.update() returns False. Attempts to update the Portal item result in the Portal item being updated, but not the Server datastore.

**To Reproduce**
1. Register a database. This can be done through ArcGIS Pro (which natively creates a Portal item), or through Manager and then clicking the Create Item button (user profile icon)
2. Follow steps in above KB article
3. Observe the ds.update() returns False
4. Attempt to update the Portal item
```python
item = gis.content.get()
print(item.get_data())
# Replace the connectionString with what was generated from the KB steps
new_data = {"path", "type", "connectionString", etc...}
item.update(data=new_data)
```
5. Navigate to the Portal item and settings. View that the Database Connection section shows the updated connectionString info, but the Server section no longer validates.
6. Navigate to the datastore item in arcgis/admin. View that the connectionString does not match what was updated in Portal.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Expected behavior**
Successful update of datastore when Portal item exists and management is required via Portal.

**Platform (please complete the following information):**
- OS: Windows Server 2022
- Browser: NA
- Python API Version: 2.4.3

**Additional context**
Info also posted to https://community.esri.com/t5/arcgis-enterprise-ideas/expose-database-datastore-item-update-password-to/idi-p/1701215

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.