# Update Account Api not working

**URL:** <https://developer.sailpoint.com/discuss/t/update-account-api-not-working/91603>\
**Category:** SHF Discussion and Questions\
**Tags:** postman, apis, sailpoint-identity-security\
**Created:** [December 2, 2024, 9:47pm UTC](https://developer.sailpoint.com/discuss/t/update-account-api-not-working/91603 "2024-12-02T21:47:42Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![salam1](https://avatars.discourse-cdn.com/v4/letter/s/3d9bf3/32.png) [@salam1](https://developer.sailpoint.com/discuss/u/salam1)\
**Post date:** [December 2, 2024, 9:47pm UTC](https://developer.sailpoint.com/discuss/t/update-account-api-not-working/91603/1 "2024-12-02T21:47:42Z")

</div>

Hello,  
I am using Insomnia (Similar to Postman) to update the account attribute value of an account. The api used is “Update Account v2024”

> **[update-account | SailPoint Developer Community](https://developer.sailpoint.com/docs/api/v2024/update-account)**
>
> \<Heading

I would like to update the roles value of the account attribute for the user:

Body of the request:

```auto
[{
  "attributes": {
    "roles": "DWH_DEVELOPER"
  }
}]

```

request URL:https://{{tenant}}.api.identitynow.com/v2024/accounts/:accountid

Headers:  
Accept: application/json  
Content-Type: application/json-patch+json

Json payload Error recieved:

```auto
{
	"detailCode": "400.0 Bad request syntax",
	"trackingId": "69163de5347745cb88a0199f042f9d9e",
	"messages": [
		{
			"locale": "en-US",
			"localeOrigin": "DEFAULT",
			"text": "The request could not be parsed."
		},
		{
			"locale": "und",
			"localeOrigin": "REQUEST",
			"text": "The request could not be parsed."
		}
	],
	"causes": []
}

```

Can you please tell me what is missing here? The get account getails api is working fine but the patch update account is giving error

---

<div class="post-metadata">

**Author:** ![salam1](https://avatars.discourse-cdn.com/v4/letter/s/3d9bf3/32.png) [@salam1](https://developer.sailpoint.com/discuss/u/salam1)\
**Post date:** [December 2, 2024, 9:49pm UTC](https://developer.sailpoint.com/discuss/t/update-account-api-not-working/91603/2 "2024-12-02T21:49:38Z")

</div>

I also tried updating the body of the patch request. got an invald path error

 ![image](https://global.discourse-cdn.com/sailpoint/original/3X/d/c/dc969ca977a915cf1f3ad5986950f45422520471.png)i

---

<div class="post-metadata">

**Author:** ![sagar\_kamalakar](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/sagar_kamalakar/32/18893_2.png) [@sagar\_kamalakar](https://developer.sailpoint.com/discuss/u/sagar_kamalakar)\
**Post date:** [December 3, 2024, 2:52am UTC](https://developer.sailpoint.com/discuss/t/update-account-api-not-working/91603/3 "2024-12-03T02:52:27Z")

</div>

@salam1 ,  
Try request body as below

```auto
[
  {
    "op": "replace",
    "path": "/attributes/roles",
    "value": "DWH_DEVELOPERS"
  }
]

```

---

<div class="post-metadata">

**Author:** ![salam1](https://avatars.discourse-cdn.com/v4/letter/s/3d9bf3/32.png) [@salam1](https://developer.sailpoint.com/discuss/u/salam1)\
**Post date:** [December 3, 2024, 2:23pm UTC](https://developer.sailpoint.com/discuss/t/update-account-api-not-working/91603/4 "2024-12-03T14:23:34Z")

</div>

Still giving me the same error. I tried updating another attribute value as well.

 ![image](https://global.discourse-cdn.com/sailpoint/original/3X/a/6/a6dd009f6c94c29dd215ccca10b7771184ec86eb.png)

---

<div class="post-metadata">

**Author:** ![sagar\_kamalakar](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/sagar_kamalakar/32/18893_2.png) [@sagar\_kamalakar](https://developer.sailpoint.com/discuss/u/sagar_kamalakar)\
**Post date:** [December 3, 2024, 3:11pm UTC](https://developer.sailpoint.com/discuss/t/update-account-api-not-working/91603/5 "2024-12-03T15:11:11Z")

</div>

@salam1 I think there are some limitations on API to update only attributes of flat file accounts and you can only modify account assignment. Please check this with SailPoint support team.

You can try the same with one on of flat file account attribute to update and confirm.

 ![image](https://global.discourse-cdn.com/sailpoint/original/3X/d/8/d8ee7367773110d160a9deec764e7967bbbf55c7.png)

---

<div class="post-metadata">

**Author:** ![salam1](https://avatars.discourse-cdn.com/v4/letter/s/3d9bf3/32.png) [@salam1](https://developer.sailpoint.com/discuss/u/salam1)\
**Post date:** [December 3, 2024, 3:46pm UTC](https://developer.sailpoint.com/discuss/t/update-account-api-not-working/91603/6 "2024-12-03T15:46:11Z")

</div>

Ahh that is a good catch. Not sure if there is any other api that would do this.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/sailpoint/original/2X/f/f2136700ed5e3703e0b85e02f6be799dacca7735.png) [@system](https://developer.sailpoint.com/discuss/u/system)\
**Post date:** [February 1, 2025, 3:47pm UTC](https://developer.sailpoint.com/discuss/t/update-account-api-not-working/91603/7 "2025-02-01T15:47:07Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
