Hey,
I am currently building an APP for JIRA Service Management using Assets via REST API. The App is fetching Assets from JIRA Cloud as App with Credentials provided. To filter for user specific assets I am trying to get the AccountID of the current User - without success.
I’ve added the scopes:
scopes: [read:cmdb-object:jira, read:jira-user]
and tried to call rest in resolver:
const userResponse = await api.asUser().requestJira(
route/rest/api/3/myself
,
{
headers: {
Accept: ‘application/json’,
},
}
);
and get context in frontend and pass it through
useEffect(() => {
const fetchData = async () => {
const context = await getContext(); // z. B. issueId, accountId etc.
const result = await invoke(‘getAssets’, {
context
});
console.log(result);
// … dein Code
};
fetchData();
}, );
both is not working. Am I missing a crucial point? The app is providing jiraServiceManagement:portalUserMenuAction so its part of the Service Desk and I am logged in as a customer user using:
unlicensedAccess:
- customer
Can someone help?
Thanks,
Fabian