eADM

How to Display the Person Who Requested Access Permission

Overview

In many notification scenarios, it is important to know who requested access permission, not just who received it. This can be critical for auditing and clarifying requests.

You can display the requester's name in a message template by using a specific nested expression.



The Expression

To retrieve the name of the person who initiated the access change, use the following expression:

[REFERENCE;DisplayName;UserName;1;[SPLIT;[OBJECTHISTORIES;Comment;EntryType;AddPermission];;4]]



How It Works

This solution works by nesting multiple expressions:

  1. OBJECT STORIES: This function retrieves the username of the person who granted the access permission from a text-based log.

  2. REFERENCE: This outer expression takes the username provided by OBJECT STORIES and looks up the person's full display name.



Example in a Message Template

You can embed this expression directly into a sentence in your message flow.

Template Code:

[displayname] has been assigned a user account in [department] and requires access to HK Oppvekst. This access was requested by [REFERENCE;DisplayName;UserName;1;[SPLIT;[OBJECTHISTORIES;Comment;EntryType;AddPermission];;4]].

Final Output: The rendered message will look like this:

Anne Helgesen has been assigned a user account at PPT and needs access to HK Oppvekst. This access was requested by Roar Kjakkevik.


Warning: This expression has a limitation that may occur in rare situations. The expression works by looking up the last person who granted a permission to the user in a text-based log. If multiple administrators grant different permissions to the same user before the next synchronization cycle runs, the expression may return the name of the last administrator to take action, which might not be the one who granted the specific permission mentioned in this notification.