# How you can retrieve the data of a custom tenant option in sdk

**URL:** <https://community.cumulocity.com/t/how-you-can-retrieve-the-data-of-a-custom-tenant-option-in-sdk/2736>\
**Category:** Forum\
**Tags:** cumulocity\
**Created:** [June 22, 2023, 7:34am UTC](https://community.cumulocity.com/t/how-you-can-retrieve-the-data-of-a-custom-tenant-option-in-sdk/2736 "2023-06-22T07:34:10Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vamsi\_Baggu](https://avatars.discourse-cdn.com/v4/letter/v/7cd45c/32.png) [@Vamsi\_Baggu](https://community.cumulocity.com/u/Vamsi_Baggu)\
**Post date:** [June 22, 2023, 7:34am UTC](https://community.cumulocity.com/t/how-you-can-retrieve-the-data-of-a-custom-tenant-option-in-sdk/2736/1 "2023-06-22T07:34:11Z")

</div>

Hi, I have a few questions.

1. I had created a custom option for tenant for a microservice and I am focusing on refactoring to SDK. The custom made api was “/tenant/options/formuladetails”. So how to retrieve the data of that option in sdk?

2. I have set the roles for the required functionalities as mentioned below. But while accessing the roles, we are getting a response as “Access denied.”  
Kindly advise on how to resolve the issue.

 ![image](https://europe1.discourse-cdn.com/flex005/uploads/cumulocity/original/3X/9/c/9c346c6d12863956f038ec40b926effbc9b42d20.png)

---

<div class="post-metadata">

**Author:** ![Vachaspati\_Diwevedi2](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/vachaspati_diwevedi2/32/1256_2.png) [@Vachaspati\_Diwevedi2](https://community.cumulocity.com/u/Vachaspati_Diwevedi2)\
**Post date:** [June 22, 2023, 7:37am UTC](https://community.cumulocity.com/t/how-you-can-retrieve-the-data-of-a-custom-tenant-option-in-sdk/2736/2 "2023-06-22T07:37:36Z")

</div>

@Vamsi_Baggu you should add the below roles in the “requiredRoles” in menifest files and rebuild the microservice and redeploy again, it should work.

“ROLE\_OPTION\_MANAGEMENT\_READ”,  
“ROLE\_OPTION\_MANAGEMENT\_ADMIN”

  

* * *

Vachaspati Diwevedi

[Software AG Professional Services](https://www.softwareag.com/en_corporate/resources/services/professional-services.html)

[![](https://europe1.discourse-cdn.com/flex005/uploads/cumulocity/original/3X/c/3/c3a93a2618e4708f51be40fe2e142061f7c4edc7.jpeg)](https://www.softwareag.com/en_corporate/resources/services/fast-track-services.html)

---

<div class="post-metadata">

**Author:** ![Kai\_Sieben](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/kai_sieben/32/5541_2.png) [@Kai\_Sieben](https://community.cumulocity.com/u/Kai_Sieben)\
**Post date:** [June 22, 2023, 8:13am UTC](https://community.cumulocity.com/t/how-you-can-retrieve-the-data-of-a-custom-tenant-option-in-sdk/2736/3 "2023-06-22T08:13:54Z")

</div>

Hi,

also consider the microservice manifest “`sessionsCategory`” setting:

[http://cumulocity.com/guides/microservice-sdk/concept/#settings](http://cumulocity.com/guides/microservice-sdk/concept/#settings)

This would allow the “MicroserviceSettingsService” to access the tenant options, without the need of the “OPTION\_MANAGEMENT” roles.

---

<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:** [December 19, 2023, 8:14am UTC](https://community.cumulocity.com/t/how-you-can-retrieve-the-data-of-a-custom-tenant-option-in-sdk/2736/4 "2023-12-19T08:14:25Z")

</div>

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