From 76165e0ecabdc88a8bb28f50380885e935257fa1 Mon Sep 17 00:00:00 2001 From: Cris Rockwell Date: Wed, 26 Aug 2026 14:12:54 -0400 Subject: [PATCH] ASSETS-76464 Document getCurrentUserProfile and getCurrentUserGroupMembership AuthAPI methods Co-Authored-By: Claude Opus 4.8 --- .../aem-assets-view/api/commons/index.md | 33 +++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/src/pages/services/aem-assets-view/api/commons/index.md b/src/pages/services/aem-assets-view/api/commons/index.md index f954f935..584e62af 100644 --- a/src/pages/services/aem-assets-view/api/commons/index.md +++ b/src/pages/services/aem-assets-view/api/commons/index.md @@ -132,8 +132,8 @@ All API invocations are asynchronous and return a `Promise`. ### Authentication API -This API provides information about the current Org, access token and API key in the AEM Assets View. -The API uses `auth` namespace. +This API provides information about the current Org, access token and API key in the AEM Assets View, as well as +the signed-in user's profile and group membership. The API uses `auth` namespace. `auth.getIMSInfo()` @@ -157,6 +157,35 @@ const { imsOrg, accessToken } = await guestConnection.host.auth.getIMSInfo(); const apiKey = await guestConnection.host.auth.getApiKey(); ``` +`auth.getCurrentUserProfile()` + +**Description:** returns basic profile information about the currently signed-in user. + +**Return Object Structure** +- `name` (`string`): The user's display name. +- `userId` (`string`): The user's IMS identifier. +- `email` (`string`): The user's email address. + +**Example:** +```js +const { name, userId, email } = guestConnection.host.auth.getCurrentUserProfile(); +``` + +`auth.getCurrentUserGroupMembership()` + +**Description:** returns the groups the currently signed-in user belongs to within the current Org. Only groups linked +to an IMS group are returned. This API is asynchronous and returns a `Promise`. + +**Return Object Structure** (`Array` of objects, each with the following properties): +- `name` (`string`): The group name. +- `linkedGroupId` (`number`): The identifier of the linked IMS group. + +**Example:** +```js +const groups = await guestConnection.host.auth.getCurrentUserGroupMembership(); +// groups: [{ name: 'Marketing', linkedGroupId: 875881973 }, ...] +``` + ### Discovery API This API provides information AEM author instance location.