<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Dynatrace App Current user information in Developer Q&amp;A Forum</title>
    <link>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Dynatrace-App-Current-user-information/m-p/255858#M1077</link>
    <description>&lt;P&gt;Is there a way to get the user account_id ?&lt;/P&gt;</description>
    <pubDate>Mon, 16 Sep 2024 12:17:17 GMT</pubDate>
    <dc:creator>DaveOps</dc:creator>
    <dc:date>2024-09-16T12:17:17Z</dc:date>
    <item>
      <title>Dynatrace App Current user information</title>
      <link>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Dynatrace-App-Current-user-information/m-p/218433#M405</link>
      <description>&lt;P&gt;Hey,&lt;/P&gt;&lt;P&gt;We are trying to build an app. We need the current user information, like name, login id/email, user groups, for further processing. Is there any SDK available that can return me this kind of information?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;Stephen&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jul 2023 21:19:48 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Dynatrace-App-Current-user-information/m-p/218433#M405</guid>
      <dc:creator>StephenLHChan</dc:creator>
      <dc:date>2023-07-18T21:19:48Z</dc:date>
    </item>
    <item>
      <title>Re: Dynatrace App Current user information</title>
      <link>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Dynatrace-App-Current-user-information/m-p/218438#M408</link>
      <description>&lt;P&gt;I am not shure, but you can do it by APIs&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jul 2023 21:59:43 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Dynatrace-App-Current-user-information/m-p/218438#M408</guid>
      <dc:creator>Iplinsky</dc:creator>
      <dc:date>2023-07-18T21:59:43Z</dc:date>
    </item>
    <item>
      <title>Re: Dynatrace App Current user information</title>
      <link>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Dynatrace-App-Current-user-information/m-p/218522#M412</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/59527"&gt;@StephenLHChan&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The team is currently working on an SDK which should give you such kind of information. Unfortunately I can't give you an ETA for it.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Best,&lt;BR /&gt;Sini&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jul 2023 10:43:04 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Dynatrace-App-Current-user-information/m-p/218522#M412</guid>
      <dc:creator>sinisa_zubic</dc:creator>
      <dc:date>2023-07-19T10:43:04Z</dc:date>
    </item>
    <item>
      <title>Re: Dynatrace App Current user information</title>
      <link>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Dynatrace-App-Current-user-information/m-p/218553#M413</link>
      <description>&lt;P&gt;following this thread...&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":eyes:"&gt;👀&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jul 2023 14:34:44 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Dynatrace-App-Current-user-information/m-p/218553#M413</guid>
      <dc:creator>jellypuno</dc:creator>
      <dc:date>2023-07-19T14:34:44Z</dc:date>
    </item>
    <item>
      <title>Re: Dynatrace App Current user information</title>
      <link>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Dynatrace-App-Current-user-information/m-p/219365#M444</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/59527"&gt;@StephenLHChan&lt;/a&gt;,&amp;nbsp;the SDK package is planned for 23CQ3.&lt;/P&gt;
&lt;P&gt;In the meanwhile, you could use the service documented in the swagger spec:&lt;/P&gt;
&lt;PRE&gt;https://{environmentid}.apps.dynatrace.com/platform/swagger-ui/index.html?urls.primaryName=Identity%20and%20Access%20Management&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Aug 2023 07:43:32 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Dynatrace-App-Current-user-information/m-p/219365#M444</guid>
      <dc:creator>s_wasserbauer</dc:creator>
      <dc:date>2023-08-01T07:43:32Z</dc:date>
    </item>
    <item>
      <title>Re: Dynatrace App Current user information</title>
      <link>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Dynatrace-App-Current-user-information/m-p/219442#M445</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/16396"&gt;@s_wasserbauer&lt;/a&gt; and&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/38283"&gt;@sinisa_zubic&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Are you guys talking the same SDK?&lt;/P&gt;&lt;P&gt;Apologize if there is any misleading at my question.&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/16396"&gt;@s_wasserbauer&lt;/a&gt;&amp;nbsp;gave the url which is the endpoint get all users' information but what I am looking for is if there is a way to get the current user information who use the app.&lt;/P&gt;&lt;P&gt;For example, userA click on the app and the SDK will return userA's information to me. And, I will know userA had used the app. I may then ingest logs/ custom events to Dynatrace after userA triggered certain actions.&lt;/P&gt;&lt;P&gt;It is to fulfil some audit requirements at my company.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 01 Aug 2023 14:21:39 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Dynatrace-App-Current-user-information/m-p/219442#M445</guid>
      <dc:creator>StephenLHChan</dc:creator>
      <dc:date>2023-08-01T14:21:39Z</dc:date>
    </item>
    <item>
      <title>Re: Dynatrace App Current user information</title>
      <link>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Dynatrace-App-Current-user-information/m-p/219969#M447</link>
      <description>&lt;P&gt;Yes we are talking about the same SDK. &lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/16396"&gt;@s_wasserbauer&lt;/a&gt;&amp;nbsp;should know more details&lt;/P&gt;</description>
      <pubDate>Mon, 07 Aug 2023 08:45:52 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Dynatrace-App-Current-user-information/m-p/219969#M447</guid>
      <dc:creator>sinisa_zubic</dc:creator>
      <dc:date>2023-08-07T08:45:52Z</dc:date>
    </item>
    <item>
      <title>Re: Dynatrace App Current user information</title>
      <link>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Dynatrace-App-Current-user-information/m-p/219976#M448</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/59527"&gt;@StephenLHChan&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sorry for the confusion.&lt;BR /&gt;Yes, the SDK package will provide information as:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;currently logged in user&lt;/LI&gt;
&lt;LI&gt;Environment ID and URL&lt;/LI&gt;
&lt;LI&gt;App ID, name, version&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;May I ask for your use case, why do you need the user groups too?&lt;/P&gt;</description>
      <pubDate>Mon, 07 Aug 2023 09:10:42 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Dynatrace-App-Current-user-information/m-p/219976#M448</guid>
      <dc:creator>s_wasserbauer</dc:creator>
      <dc:date>2023-08-07T09:10:42Z</dc:date>
    </item>
    <item>
      <title>Re: Dynatrace App Current user information</title>
      <link>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Dynatrace-App-Current-user-information/m-p/220629#M452</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/16396"&gt;@s_wasserbauer&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;it is for access right control. If I know the user group of the users, I can limited certain pages of the app only to some users.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Aug 2023 20:28:24 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Dynatrace-App-Current-user-information/m-p/220629#M452</guid>
      <dc:creator>StephenLHChan</dc:creator>
      <dc:date>2023-08-14T20:28:24Z</dc:date>
    </item>
    <item>
      <title>Re: Dynatrace App Current user information</title>
      <link>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Dynatrace-App-Current-user-information/m-p/221109#M459</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/59527"&gt;@StephenLHChan&lt;/a&gt;&amp;nbsp; for the insights! This won't be part of this package for now, but I'll discuss this with the team.&lt;/P&gt;</description>
      <pubDate>Mon, 21 Aug 2023 13:14:05 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Dynatrace-App-Current-user-information/m-p/221109#M459</guid>
      <dc:creator>s_wasserbauer</dc:creator>
      <dc:date>2023-08-21T13:14:05Z</dc:date>
    </item>
    <item>
      <title>Re: Dynatrace App Current user information</title>
      <link>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Dynatrace-App-Current-user-information/m-p/251423#M1032</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/16396"&gt;@s_wasserbauer&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;&lt;BR /&gt;Has there been any update on the SDK yet?&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jul 2024 17:20:31 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Dynatrace-App-Current-user-information/m-p/251423#M1032</guid>
      <dc:creator>muzztafa</dc:creator>
      <dc:date>2024-07-23T17:20:31Z</dc:date>
    </item>
    <item>
      <title>Re: Dynatrace App Current user information</title>
      <link>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Dynatrace-App-Current-user-information/m-p/253900#M1065</link>
      <description>&lt;P&gt;The package providing this information (except user groups) is now available:&amp;nbsp;&lt;A href="https://developer.dynatrace.com/develop/sdks/app-environment/" target="_blank"&gt;https://developer.dynatrace.com/develop/sdks/app-environment/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Aug 2024 07:41:58 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Dynatrace-App-Current-user-information/m-p/253900#M1065</guid>
      <dc:creator>s_wasserbauer</dc:creator>
      <dc:date>2024-08-22T07:41:58Z</dc:date>
    </item>
    <item>
      <title>Re: Dynatrace App Current user information</title>
      <link>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Dynatrace-App-Current-user-information/m-p/254798#M1071</link>
      <description>&lt;P&gt;I also have the same use case to shield of pages for default users; I would like to be able to access the user groups through the SDK.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Sep 2024 09:54:13 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Dynatrace-App-Current-user-information/m-p/254798#M1071</guid>
      <dc:creator>DaveOps</dc:creator>
      <dc:date>2024-09-10T09:54:13Z</dc:date>
    </item>
    <item>
      <title>Re: Dynatrace App Current user information</title>
      <link>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Dynatrace-App-Current-user-information/m-p/255318#M1074</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/78577"&gt;@DaveOps&lt;/a&gt;, a new SDK will soon be available to access the user groups. I'll let you know when it's out.&lt;/P&gt;
&lt;P&gt;Best, Edu.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Sep 2024 10:15:16 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Dynatrace-App-Current-user-information/m-p/255318#M1074</guid>
      <dc:creator>educampver</dc:creator>
      <dc:date>2024-09-10T10:15:16Z</dc:date>
    </item>
    <item>
      <title>Re: Dynatrace App Current user information</title>
      <link>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Dynatrace-App-Current-user-information/m-p/255857#M1076</link>
      <description>&lt;P&gt;It seems this API is not available any more:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;import { effectivePermissionsClient } from '@dynatrace-sdk/client-platform-management-service';&lt;/LI-CODE&gt;&lt;P&gt;Outdated docs:&lt;BR /&gt;&lt;A href="https://developer.dynatrace.com/develop/security/query-user-permissions/" target="_blank" rel="noopener"&gt;https://developer.dynatrace.com/develop/security/query-user-permissions/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Is there a workaround for this?&lt;/P&gt;</description>
      <pubDate>Mon, 16 Sep 2024 12:16:23 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Dynatrace-App-Current-user-information/m-p/255857#M1076</guid>
      <dc:creator>DaveOps</dc:creator>
      <dc:date>2024-09-16T12:16:23Z</dc:date>
    </item>
    <item>
      <title>Re: Dynatrace App Current user information</title>
      <link>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Dynatrace-App-Current-user-information/m-p/255858#M1077</link>
      <description>&lt;P&gt;Is there a way to get the user account_id ?&lt;/P&gt;</description>
      <pubDate>Mon, 16 Sep 2024 12:17:17 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Dynatrace-App-Current-user-information/m-p/255858#M1077</guid>
      <dc:creator>DaveOps</dc:creator>
      <dc:date>2024-09-16T12:17:17Z</dc:date>
    </item>
    <item>
      <title>Re: Dynatrace App Current user information</title>
      <link>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Dynatrace-App-Current-user-information/m-p/255861#M1078</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/78577"&gt;@DaveOps&lt;/a&gt;, what do you mean it's not available? Here's the NPM package&amp;nbsp;&lt;A href="https://www.npmjs.com/package/@dynatrace-sdk/client-platform-management-service" target="_blank"&gt;https://www.npmjs.com/package/@dynatrace-sdk/client-platform-management-service&lt;/A&gt;. Additionally I tried what's in our documentation and it works as expected. What issue are you having?&lt;/P&gt;</description>
      <pubDate>Mon, 16 Sep 2024 12:23:01 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Dynatrace-App-Current-user-information/m-p/255861#M1078</guid>
      <dc:creator>educampver</dc:creator>
      <dc:date>2024-09-16T12:23:01Z</dc:date>
    </item>
    <item>
      <title>Re: Dynatrace App Current user information</title>
      <link>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Dynatrace-App-Current-user-information/m-p/255886#M1079</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/78577"&gt;@DaveOps&lt;/a&gt;, you can use this&amp;nbsp;&lt;A href="https://developer.dynatrace.com/develop/sdks/app-environment/#getcurrentuserdetails" target="_blank"&gt;https://developer.dynatrace.com/develop/sdks/app-environment/#getcurrentuserdetails&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Sep 2024 14:23:46 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Dynatrace-App-Current-user-information/m-p/255886#M1079</guid>
      <dc:creator>educampver</dc:creator>
      <dc:date>2024-09-16T14:23:46Z</dc:date>
    </item>
    <item>
      <title>Re: Dynatrace App Current user information</title>
      <link>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Dynatrace-App-Current-user-information/m-p/256035#M1080</link>
      <description>&lt;P&gt;I created a solution to address the user permission problem and will share some of the important parts.&lt;BR /&gt;The approach involves checking if a user is part of an admin group returning a boolean. This is a simple way of differentiating between 2 types of users.&lt;BR /&gt;&lt;BR /&gt;Created an appFunction that fetches user groups with the getUserGroupsV2 function. This function checks if a user belongs to an admin group.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;export const getUserGroupsV2 = async (accountUuid: string, userEmail: string, bearerToken: string) =&amp;gt; {
  const url = `https://api.dynatrace.com/iam/v1/accounts/${accountUuid}/users/${userEmail}`;

  try {
    const response = await fetch(`${url}`, {
      method: 'GET',
      headers: {
        'Content-Type': 'application/json',
        'Authorization': `Bearer ${bearerToken}`
      }
    });

    if (!response.ok) {
      const errorText = await response.text();
      console.error('Error response:', errorText);
      throw new Error(`HTTP error! status: ${response.status}`);
    }

    return await response.json(); 
  } catch (error) {
    console.error('Error fetching groups:', error);
    throw error;
  }
};&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Make an oauth request to get the bearer token:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;export const getOAuth2Token = async (client_id: string, client_secret: string, scope: string, resource: string) =&amp;gt; {
  const url = 'https://sso.dynatrace.com/sso/oauth2/token';

  const params = new URLSearchParams({
    grant_type: 'client_credentials',
    scope: scope,
    client_id: client_id,
    client_secret: client_secret,
    resource: resource,
  });

  try {
    const response = await fetch(url, {
      method: 'POST',
      headers: {
        'Content-Type': 'application/x-www-form-urlencoded',
      },
      body: params.toString()
    });

    if (!response.ok) {
      const errorText = await response.text();
      console.error('Error response:', errorText);
      throw new Error(`HTTP error! status: ${response.status}`);
    }

    const data = await response.json(); 
    return data;
  } catch (error) {
    console.error('Error fetching OAuth2 token:', error);
    throw error;
  }
};&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;With a couple of helper functions:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;const belongsToGroup = (user: User, groupName: string) =&amp;gt; {
    if (user &amp;amp;&amp;amp; user.groups &amp;amp;&amp;amp; Array.isArray(user.groups)) {
        return user.groups.some(group =&amp;gt; group.groupName.toLocaleLowerCase() === groupName.toLocaleLowerCase());
    }
    return false;
}

export const isSecurityAdmin = (user: User) =&amp;gt; {
    return belongsToGroup(user, 'Security Admin');
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;You can store the oauth credentials in a .env for development purposes however I would recommend adding additional features to fetch and update the settings using the client-app-settings from the sdk.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;// example

import { appSettingsObjectsClient, EffectiveAppSettingsValuesList, AppSettingsObjectResponse } from '@dynatrace-sdk/client-app-settings';

export const fetchConfig = async (schemaId: string): Promise&amp;lt;any[] | null&amp;gt; =&amp;gt; {
    try {
        const response: EffectiveAppSettingsValuesList = await appSettingsObjectsClient.getEffectiveAppSettingsValues({
            schemaIds: schemaId,
        });

        if (response.items.length === 0) {
            console.warn(`No configuration found for ${schemaId}.`);
            return null;
        }

        console.log(`fetchConfig for schemaId: ${schemaId}`, response.items);

        return response.items;
    } catch (error) {
        console.error(`Error fetching configuration for schemaId: ${schemaId}`, error);
        return null;
    }
};

export const updateAppSettings = async (
    objectId: string,
    value: { [key: string]: any },
    optimisticLockingVersion: string
): Promise&amp;lt;boolean&amp;gt; =&amp;gt; {
    let result = false;

    console.log('updateAppSettings', objectId, value);

    try {
        const putResponse: any = await appSettingsObjectsClient.putAppSettingsObjectByObjectId({
            objectId: objectId,
            optimisticLockingVersion: optimisticLockingVersion,
            body: {
                value: value
            }
        });

        if (putResponse) {
            console.log('Configuration updated:', putResponse);
            result = true;
        } else {
            console.warn('No response received from PUT request.');
        }
    } catch (putError) {
        console.error('Error during PUT:', putError);
    }

    return result;
};&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;The front-end parts:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;// .... snippet

import React, { useEffect, useState } from 'react';
import { getCurrentUserDetails } from "@dynatrace-sdk/app-environment";
import { useAppFunction } from '@dynatrace-sdk/react-hooks';

// .... snippet
const [loading, setLoading] = useState(true);
const [userEmail, setUserEmail] = useState&amp;lt;string | null&amp;gt;(null);
const { setPermissions } = useAppState(); // custom hook to store state 

// .... snippet
// implement your own appFunction to fetch permissions that uses the getUserGroupsV2 function.
const fetchPermissions = useAppFunction({
    name: "backend",
    data: { query: "fetch-permissions", blob: userEmail },
  }, { autoFetch: false, autoFetchOnUpdate: true });

// .... snippet
useEffect(() =&amp;gt; {
    const fetchUserData = async () =&amp;gt; {
      try {
        const userDetails = await getCurrentUserDetails();
        console.log('User details:', userDetails);
        if (userDetails.email) {
          setUserEmail(userDetails.email);
          fetchPermissions.refetch();
        }
      } catch (error) {
        console.error('Failed to fetch data', error);
      } finally {
        setLoading(false);
      }
    }
    fetchUserData();
  }, []);

  useEffect(() =&amp;gt; {
    if (fetchPermissions.data) {
      const { permissions } = fetchPermissions.data as PermissionsResponse;
      setPermissions(permissions);
    }
  }, [fetchPermissions]);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Based on the permissions you can toggle menu items:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;{permissions?.admin &amp;amp;&amp;amp; (
          &amp;lt;AppHeader.ActionItemGroup&amp;gt;
            &amp;lt;AppHeader.ActionButton
              prefixIcon={&amp;lt;SettingIcon /&amp;gt;}
              showLabel={true}
              onClick={() =&amp;gt; navigate('/settings')}
              aria-label="App Settings"
            &amp;gt;
              Settings
            &amp;lt;/AppHeader.ActionButton&amp;gt;
          &amp;lt;/AppHeader.ActionItemGroup&amp;gt;
)}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Sep 2024 08:25:07 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Dynatrace-App-Current-user-information/m-p/256035#M1080</guid>
      <dc:creator>DaveOps</dc:creator>
      <dc:date>2024-09-17T08:25:07Z</dc:date>
    </item>
    <item>
      <title>Re: Dynatrace App Current user information</title>
      <link>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Dynatrace-App-Current-user-information/m-p/256042#M1081</link>
      <description>&lt;P&gt;There is a problem with the permission scope for this API that can't be assigned to an oauth client.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Sep 2024 08:28:19 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Dynatrace-App-Current-user-information/m-p/256042#M1081</guid>
      <dc:creator>DaveOps</dc:creator>
      <dc:date>2024-09-17T08:28:19Z</dc:date>
    </item>
  </channel>
</rss>

