# Perspective Component Event Security not Working

**URL:** <https://forum.inductiveautomation.com/t/perspective-component-event-security-not-working/95438>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [September 2, 2024, 5:52pm UTC](https://forum.inductiveautomation.com/t/perspective-component-event-security-not-working/95438 "2024-09-02T17:52:30Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jose\_Rivera](https://avatars.discourse-cdn.com/v4/letter/j/e79b87/32.png) [@Jose\_Rivera](https://forum.inductiveautomation.com/u/Jose_Rivera)\
**Post date:** [September 2, 2024, 5:52pm UTC](https://forum.inductiveautomation.com/t/perspective-component-event-security-not-working/95438/1 "2024-09-02T17:52:30Z")

</div>

Hello, I am trying to use roles based security in Igniton Perspective. I followed the following steps.

1. Configured the IDP
2. Create Roles
3. Added Users with Roles
4. Added Security Levels (Match Roles)
5. Added a button in Perspective
6. Added an OnClick Event
7. Enabled Security Settings in the Event (Slected one of the Security Levels previously created)
8. Launched the client and logged in with a user that has the security level assigned ot the button.

When I try the button I keep receiving the message "Action Denied". If I run it in preview mode in designer it works.

 ![Role](https://us1.discourse-cdn.com/inductiveautomation/original/3X/2/8/280046633de28bf5a725fda9d18f9bcea164330a.png)  
 ![Security Level](https://us1.discourse-cdn.com/inductiveautomation/original/3X/9/1/918bb7e2e57ce6c2d3e828a7f6aa6c9832f49831.png)  
 ![Use with Role](https://us1.discourse-cdn.com/inductiveautomation/original/3X/f/5/f57e1aebee62e7b6a86ceca94d556e1987d93613.png)

---

<div class="post-metadata">

**Author:** ![Jose\_Rivera](https://avatars.discourse-cdn.com/v4/letter/j/e79b87/32.png) [@Jose\_Rivera](https://forum.inductiveautomation.com/u/Jose_Rivera)\
**Post date:** [September 2, 2024, 5:53pm UTC](https://forum.inductiveautomation.com/t/perspective-component-event-security-not-working/95438/2 "2024-09-02T17:53:48Z")

</div>

Additional Media

 ![Logged User](https://us1.discourse-cdn.com/inductiveautomation/original/3X/7/3/73103501c943fefdb14c4db7cf5ae0b7da9a605b.png)  
 ![vDXT-SIEMENS-2024-09-02-13-38-08](https://us1.discourse-cdn.com/inductiveautomation/original/3X/6/8/68be9e732d1eeae490a1da95089001b2796e7ff8.png)

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [September 2, 2024, 9:07pm UTC](https://forum.inductiveautomation.com/t/perspective-component-event-security-not-working/95438/3 "2024-09-02T21:07:28Z")

</div>

Hmm. May be a bug worth reporting (to support). But most such things don't apply to click events on buttons, but only to the "actionPerformed" event. You should always use that event instead of a click event for maximum compatibility with touchscreens and alternate input methods.

---

<div class="post-metadata">

**Author:** ![Jose\_Rivera](https://avatars.discourse-cdn.com/v4/letter/j/e79b87/32.png) [@Jose\_Rivera](https://forum.inductiveautomation.com/u/Jose_Rivera)\
**Post date:** [September 2, 2024, 9:46pm UTC](https://forum.inductiveautomation.com/t/perspective-component-event-security-not-working/95438/4 "2024-09-02T21:46:33Z")

</div>

Thanks for the feedback. I changed the event to actionPerformed. I get the same result but will consider the recommendation, and adopt it as a best practice, to configure those scripts in the actionPerformed event.
