# Using custom security level in "isAuthorized"

**URL:** <https://forum.inductiveautomation.com/t/using-custom-security-level-in-isauthorized/73558>\
**Category:** Ignition\
**Tags:** ignition81, perspective\
**Created:** [May 10, 2023, 7:21pm UTC](https://forum.inductiveautomation.com/t/using-custom-security-level-in-isauthorized/73558 "2023-05-10T19:21:58Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![bhollett](https://avatars.discourse-cdn.com/v4/letter/b/c57346/32.png) [@bhollett](https://forum.inductiveautomation.com/u/bhollett)\
**Post date:** [May 10, 2023, 7:21pm UTC](https://forum.inductiveautomation.com/t/using-custom-security-level-in-isauthorized/73558/1 "2023-05-10T19:21:58Z")

</div>

I created a security level intended to group specific roles that have permission to use on screen controls that affect running machinery. The test login on the IDP shows this level being attached to the correct user logins, based on their defined role.  
 ![level_1](https://us1.discourse-cdn.com/inductiveautomation/original/3X/d/d/dd5a30ba74721117fb46cc0160236385247a8393.png)

I want to make a control visible based on this new level, "machineAccess", but the expression

isAuthorized(false,"Authenticated/machineAccess")

always returns false. Any ideas as to what I'm missing? It seems like it should work.

(Background note -- I have role based security already working, but the roles allowed this access are in flux and I would like to be able to add or remove a role without changing every binding each time.)

Thanks for any suggestions you can offer.

---

<div class="post-metadata">

**Author:** ![djs](https://avatars.discourse-cdn.com/v4/letter/d/e47774/32.png) [@djs](https://forum.inductiveautomation.com/u/djs)\
**Post date:** [May 10, 2023, 7:31pm UTC](https://forum.inductiveautomation.com/t/using-custom-security-level-in-isauthorized/73558/2 "2023-05-10T19:31:27Z")

</div>

You'll need the "/Roles/" in there as well. Like this:  
`isAuthorized(false,"Authenticated/Roles/machineAccess")`

---

<div class="post-metadata">

**Author:** ![bhollett](https://avatars.discourse-cdn.com/v4/letter/b/c57346/32.png) [@bhollett](https://forum.inductiveautomation.com/u/bhollett)\
**Post date:** [May 10, 2023, 8:15pm UTC](https://forum.inductiveautomation.com/t/using-custom-security-level-in-isauthorized/73558/3 "2023-05-10T20:15:18Z")

</div>

Thanks for the quick reply.

That doesn't seem to make a difference. To be on the safe side, I also tried closing and reopening Designer to force a new login, but no joy.

I can see it isn't obvious in the screenshot, but on the tree, machineAccess is a child of Authenticated rather than Roles. (And when the node is selected on the Security Levels screen, the path shown is Authenticated/machineAccess).

I tried adding a new level under Roles, but (like the existing defined roles) that didn't show up on the rules page at all so I couldn't configure any logic there.

It probably is some little syntax thing like this, but I just can't see it.

---

<div class="post-metadata">

**Author:** ![Francisco\_Franco](https://avatars.discourse-cdn.com/v4/letter/f/7ea924/32.png) [@Francisco\_Franco](https://forum.inductiveautomation.com/u/Francisco_Franco)\
**Post date:** [November 13, 2024, 9:54pm UTC](https://forum.inductiveautomation.com/t/using-custom-security-level-in-isauthorized/73558/4 "2024-11-13T21:54:24Z")

</div>

Did you ever find a fix? I'm having a similar problem, I think it's syntax related as well.
