# IDP Role Mismatch When Using WebDev Page Inside Perspective iFrame

**URL:** <https://forum.inductiveautomation.com/t/idp-role-mismatch-when-using-webdev-page-inside-perspective-iframe/114354>\
**Category:** Ignition\
**Tags:** perspective, ignition81, webdev\
**Created:** [March 6, 2026, 6:30am UTC](https://forum.inductiveautomation.com/t/idp-role-mismatch-when-using-webdev-page-inside-perspective-iframe/114354 "2026-03-06T06:30:55Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![ragha0211](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@ragha0211](https://forum.inductiveautomation.com/u/ragha0211)\
**Post date:** [March 6, 2026, 6:30am UTC](https://forum.inductiveautomation.com/t/idp-role-mismatch-when-using-webdev-page-inside-perspective-iframe/114354/1 "2026-03-06T06:30:55Z")

</div>

I have created a webpage using the **Ignition WebDev module** and embedded it in a **Perspective view using an iframe**. I also implemented login and logout functionality.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/0/7/0795dbfa4789a930def54ff7b1f48dd51193e56f.png)

I have two HTML pages:

- **Dashboard**
- **Checklist**

The **Checklist** page displays plant data based on **user roles defined in the Identity Provider (IDP)**.

Example role configuration:

- **User A** → Role to access **AAA plant data**
- **User B** → Role to access **BBB plant data**

These roles are configured in the **IDP and mapped to users**.

**Application Flow:**

1. The user logs into **Perspective** using IDP authentication.
2. The **Dashboard** page loads first.
3. When navigating to the **Checklist** page and selecting a plant, a **popup login page** appears.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/c/9/c916bcb8f97a4c0b673a0938faba8fd971473adf.png)

1. In this popup, I enter **User A’s credentials** , while the **Perspective session is already logged in as User B**.

**Problem:**  
When the WebDev page checks the user roles, it returns the roles for **User A** (entered in the popup login) instead of the roles for **User B** (the user authenticated in the Perspective session).

It appears that the **browser-level authentication from the popup login is overriding or being used instead of the Perspective session's IDP authentication**.

**Question:**  
How can I ensure that the **WebDev page uses the authenticated Perspective session user (User B)** instead of the credentials entered in the popup login?

---

<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:** [March 6, 2026, 12:27pm UTC](https://forum.inductiveautomation.com/t/idp-role-mismatch-when-using-webdev-page-inside-perspective-iframe/114354/2 "2026-03-06T12:27:07Z")

</div>

> [@ragha0211](#):
>
> How can I ensure that

The issue is the use of an IFrame. IFrames are independent of, and carry no context from, the outer page. This is basic to IFrame security. (Except for keys embedded in their URL.)

---

<div class="post-metadata">

**Author:** ![ragha0211](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@ragha0211](https://forum.inductiveautomation.com/u/ragha0211)\
**Post date:** [March 9, 2026, 6:30am UTC](https://forum.inductiveautomation.com/t/idp-role-mismatch-when-using-webdev-page-inside-perspective-iframe/114354/3 "2026-03-09T06:30:56Z")

</div>

I am using a custom login and logout page, and I manage the username, password, and roles in the database instead of using the Ignition User IDP. However, I am still getting this popup. Why is this happening?

---

<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:** [March 9, 2026, 3:53pm UTC](https://forum.inductiveautomation.com/t/idp-role-mismatch-when-using-webdev-page-inside-perspective-iframe/114354/4 "2026-03-09T15:53:22Z")

</div>

WebDev doesn't hook into Perspective sessions automatically. Its sessions are independent.

Your WebDev content would need to delegate to the same IdP as Perspective using the SAML standard, with single-sign-on configured in that IdP.

I'm not sure what you mean by managing auth with your own pages, unless you've implemented a true external IdP? (Perspective has no way to script authentication outside of an assigned IdP.) You are unlike to share auth with Perspective without a shared IdP.

---

<div class="post-metadata">

**Author:** ![ragha0211](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@ragha0211](https://forum.inductiveautomation.com/u/ragha0211)\
**Post date:** [March 10, 2026, 4:11am UTC](https://forum.inductiveautomation.com/t/idp-role-mismatch-when-using-webdev-page-inside-perspective-iframe/114354/5 "2026-03-10T04:11:26Z")

</div>

using **webdev** my requirement is to **show data based on the logged-in user’s roles**. The users log in through an **Identity Provider (IDP)** ,

Is it possible or not ?

---

<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:** [March 10, 2026, 11:21am UTC](https://forum.inductiveautomation.com/t/idp-role-mismatch-when-using-webdev-page-inside-perspective-iframe/114354/6 "2026-03-10T11:21:39Z")

</div>

Yes. Implement SAML auth in WebDev. (You are on your own for this part--I've never done it because Perspective does it for me.) Point it at the same IdP. 🤷‍♂️

---

<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:** [March 10, 2026, 12:03pm UTC](https://forum.inductiveautomation.com/t/idp-role-mismatch-when-using-webdev-page-inside-perspective-iframe/114354/7 "2026-03-10T12:03:33Z")

</div>

You might be able to retrieve the `PerspectiveSessionCollection` from the WebDev's `session` prop, and then use [.getOrCreateSession()](https://sdk.inductiveautomation.com/javadoc/ignition81/8.1.47/com/inductiveautomation/perspective/gateway/session/PerspectiveSessionCollection.html#getOrCreateSession(java.lang.String)) to obtain the outer session.

(Use the `perspective-session` attribute on the WebDev session. This is what my blob server does.)
