# Tenant Option with encrypted values cannot be deleted

**URL:** <https://community.cumulocity.com/t/tenant-option-with-encrypted-values-cannot-be-deleted/7388>\
**Category:** Forum\
**Tags:** cumulocity\
**Created:** [November 23, 2023, 10:19am UTC](https://community.cumulocity.com/t/tenant-option-with-encrypted-values-cannot-be-deleted/7388 "2023-11-23T10:19:17Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kai\_Reinhardt](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/kai_reinhardt/32/18493_2.png) [@Kai\_Reinhardt](https://community.cumulocity.com/u/Kai_Reinhardt)\
**Post date:** [November 23, 2023, 10:19am UTC](https://community.cumulocity.com/t/tenant-option-with-encrypted-values-cannot-be-deleted/7388/1 "2023-11-23T10:19:18Z")

</div>

#### _ **Product/components** used and **version/fix** level:_

10.18.0.261 on an Enterprise tenant

#### _Detailed explanation of the problem:_

Hi Guys

trying to delete a tenant option

with GET can have a look on the tenant option I want to delete  
{  
“self”: “[https://xxxxxxx.eu-latest.cumulocity.com/tenant/options/sag-global-tenant-management.credentials/credentials.env474374](https://xxxxxxx.eu-latest.cumulocity.com/tenant/options/sag-global-tenant-management.credentials/credentials.env474374)”,  
“category”: “sag-global-tenant-management.credentials”,  
“value”: “\<\>”,  
“key”: “credentials.env474374”  
}

Postman  
DELETE

{  
“error”: “options/Not Found”,  
“message”: “Cannot delete option. : Unable to find option by given key: sag-global-tenant-management.credentials/credentials.env474374”,  
“info”: “[https://www.cumulocity.com/guides/reference/rest-implementation//#a-name-error-reporting-a-error-reporting](https://www.cumulocity.com/guides/reference/rest-implementation//#a-name-error-reporting-a-error-reporting)”  
}

C8YCLI  
c8y tenantoptions delete --category “sag-global-tenant-management.credentials” --key “credentials.env474374”  
? Confirm (job: 1)  
Delete tenant option on tenant xxxxxxx  
[y] Yes [a] Yes to All [n] No [l] No to All y  
2023-11-23T10:57:59.935+0100 ERROR serverError: Cannot delete option. : Unable to find option by given key: sag-global-tenant-management.credentials/credentials.env474374 DELETE [https://xxxxxxx.eu-latest.cumulocity.com/tenant/options/sag-global-tenant-management.credentials/credentials.env474374:](https://xxxxxxx.eu-latest.cumulocity.com/tenant/options/sag-global-tenant-management.credentials/credentials.env474374:) 404 options/Not Found Cannot delete option. : Unable to find option by given key: sag-global-tenant-management.credentials/credentials.env474374

any idea why I cannot delete this option?

Why would I delete this option? I have 1500 of them and just want to get rid of them,

#### _Error messages / **full error** message screenshot / **log** file:_

#### _Question related to a **free trial** , or to a **production (customer)** instance?_

---

<div class="post-metadata">

**Author:** ![Cyril\_Poder](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/cyril_poder/32/17142_2.png) [@Cyril\_Poder](https://community.cumulocity.com/u/Cyril_Poder)\
**Post date:** [November 23, 2023, 10:35am UTC](https://community.cumulocity.com/t/tenant-option-with-encrypted-values-cannot-be-deleted/7388/2 "2023-11-23T10:35:04Z")

</div>

Hi,

The credentials prefix is only used at creation time to tell the system to encrypt the option.  
When getting it or deleting it, you should remove that prefix:  
`https://xxxxxxx.eu-latest.cumulocity.com/tenant/options/sag-global-tenant-management.credentials/env474374`

Best regards,

Cyril

---

<div class="post-metadata">

**Author:** ![Robert\_Neale](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/robert_neale/32/31965_2.png) [@Robert\_Neale](https://community.cumulocity.com/u/Robert_Neale)\
**Post date:** [November 23, 2023, 10:44am UTC](https://community.cumulocity.com/t/tenant-option-with-encrypted-values-cannot-be-deleted/7388/3 "2023-11-23T10:44:31Z")

</div>

Works fine for me…

 ![image](https://europe1.discourse-cdn.com/flex005/uploads/cumulocity/original/3X/a/2/a2cb48b4d32c51fab2380bd39229c34027162c0d.png)

Maybe it’s something about the value ( I presume you have not posted the actual value).

---

<div class="post-metadata">

**Author:** ![Kai\_Reinhardt](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/kai_reinhardt/32/18493_2.png) [@Kai\_Reinhardt](https://community.cumulocity.com/u/Kai_Reinhardt)\
**Post date:** [November 23, 2023, 10:46am UTC](https://community.cumulocity.com/t/tenant-option-with-encrypted-values-cannot-be-deleted/7388/4 "2023-11-23T10:46:06Z")

</div>

/tenant/options/sag-global-tenant-management.credentials/env474374

is not working

---

<div class="post-metadata">

**Author:** ![Kai\_Reinhardt](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/kai_reinhardt/32/18493_2.png) [@Kai\_Reinhardt](https://community.cumulocity.com/u/Kai_Reinhardt)\
**Post date:** [November 23, 2023, 10:46am UTC](https://community.cumulocity.com/t/tenant-option-with-encrypted-values-cannot-be-deleted/7388/5 "2023-11-23T10:46:50Z")

</div>

well the value is a password and encrypted

---

<div class="post-metadata">

**Author:** ![Robert\_Neale](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/robert_neale/32/31965_2.png) [@Robert\_Neale](https://community.cumulocity.com/u/Robert_Neale)\
**Post date:** [November 23, 2023, 11:01am UTC](https://community.cumulocity.com/t/tenant-option-with-encrypted-values-cannot-be-deleted/7388/6 "2023-11-23T11:01:48Z")

</div>

Strangely after my DELETE looks to have succeeded I can still GET the option.  
DELETE agin then gets “options/Not Found”,  
Maybe yours has already been deleted and you are trying to delete it again?

---

<div class="post-metadata">

**Author:** ![Kai\_Reinhardt](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/kai_reinhardt/32/18493_2.png) [@Kai\_Reinhardt](https://community.cumulocity.com/u/Kai_Reinhardt)\
**Post date:** [November 23, 2023, 12:02pm UTC](https://community.cumulocity.com/t/tenant-option-with-encrypted-values-cannot-be-deleted/7388/7 "2023-11-23T12:02:08Z")

</div>

I have created a new encrypted tenant.option and deleted … which worked fine

---

<div class="post-metadata">

**Author:** ![Robert\_Neale](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/robert_neale/32/31965_2.png) [@Robert\_Neale](https://community.cumulocity.com/u/Robert_Neale)\
**Post date:** [November 23, 2023, 12:41pm UTC](https://community.cumulocity.com/t/tenant-option-with-encrypted-values-cannot-be-deleted/7388/8 "2023-11-23T12:41:50Z")

</div>

Can you GET it again?

---

<div class="post-metadata">

**Author:** ![Kai\_Reinhardt](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/kai_reinhardt/32/18493_2.png) [@Kai\_Reinhardt](https://community.cumulocity.com/u/Kai_Reinhardt)\
**Post date:** [November 23, 2023, 12:42pm UTC](https://community.cumulocity.com/t/tenant-option-with-encrypted-values-cannot-be-deleted/7388/9 "2023-11-23T12:42:36Z")

</div>

no  
it is not accessible

---

<div class="post-metadata">

**Author:** ![Robert\_Neale](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/robert_neale/32/31965_2.png) [@Robert\_Neale](https://community.cumulocity.com/u/Robert_Neale)\
**Post date:** [November 23, 2023, 12:53pm UTC](https://community.cumulocity.com/t/tenant-option-with-encrypted-values-cannot-be-deleted/7388/10 "2023-11-23T12:53:18Z")

</div>

So is it only a problem with category ‘sag-global-tenant-management.credentials’?

I can add an option for ‘xx-xlobal-xenant-xanagement.xredentials’ GET and DELETE it OK, but for the above category it ‘sticks around’.

---

<div class="post-metadata">

**Author:** ![Kai\_Reinhardt](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/kai_reinhardt/32/18493_2.png) [@Kai\_Reinhardt](https://community.cumulocity.com/u/Kai_Reinhardt)\
**Post date:** [November 23, 2023, 1:26pm UTC](https://community.cumulocity.com/t/tenant-option-with-encrypted-values-cannot-be-deleted/7388/11 "2023-11-23T13:26:02Z")

</div>

For the moment I believe these Tenant Options are used of the **[cumulocity-tenant-option-management-plugin](https://github.com/Cumulocity-IoT/cumulocity-tenant-option-management-plugin)** somehow.

On another Enterprise tenant I see the same Tenant Options.

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/system/32/31990_2.png) [@system](https://community.cumulocity.com/u/system)\
**Post date:** [May 21, 2024, 1:26pm UTC](https://community.cumulocity.com/t/tenant-option-with-encrypted-values-cannot-be-deleted/7388/12 "2024-05-21T13:26:57Z")

</div>

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