# Perspective session switch and pass login credentials across gateways

**URL:** <https://forum.inductiveautomation.com/t/perspective-session-switch-and-pass-login-credentials-across-gateways/55109>\
**Category:** Ignition\
**Tags:** perspective, scripting, ignition81\
**Created:** [January 18, 2022, 2:23pm UTC](https://forum.inductiveautomation.com/t/perspective-session-switch-and-pass-login-credentials-across-gateways/55109 "2022-01-18T14:23:48Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![markusx1094](https://avatars.discourse-cdn.com/v4/letter/m/77aa72/32.png) [@markusx1094](https://forum.inductiveautomation.com/u/markusx1094)\
**Post date:** [January 18, 2022, 2:23pm UTC](https://forum.inductiveautomation.com/t/perspective-session-switch-and-pass-login-credentials-across-gateways/55109/1 "2022-01-18T14:23:49Z")

</div>

So I have a user management project that needs to be able to switch between gateways. I got it to switch gateways but the credentials don’t transfer over to the new app. Is there a way to try and validate a currently logged in user on a different gateway? Also when you switch on the perspective app it kicks you to your default browser which isn’t a big deal but annoying to deal with.  
edit: Reworded to clarify

---

<div class="post-metadata">

**Author:** ![Alec\_Anthony](https://avatars.discourse-cdn.com/v4/letter/a/5f9b8f/32.png) [@Alec\_Anthony](https://forum.inductiveautomation.com/u/Alec_Anthony)\
**Post date:** [April 16, 2024, 2:29pm UTC](https://forum.inductiveautomation.com/t/perspective-session-switch-and-pass-login-credentials-across-gateways/55109/2 "2024-04-16T14:29:39Z")

</div>

I know its been a long time, but did you have any success with this? I'm looking to do the exact same thing.

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [April 16, 2024, 2:33pm UTC](https://forum.inductiveautomation.com/t/perspective-session-switch-and-pass-login-credentials-across-gateways/55109/3 "2024-04-16T14:33:49Z")

</div>

No, our IdP isn't set up to handle this, nor is switching users seamlessly _across gateways_ likely to happen anytime soon.

Your best bet is probably an external IdP, though it may or may not still distinguish between the two different applications and require the additional sign in.

---

<div class="post-metadata">

**Author:** ![Elias.Bachtoubdji](https://avatars.discourse-cdn.com/v4/letter/e/90db22/32.png) [@Elias.Bachtoubdji](https://forum.inductiveautomation.com/u/Elias.Bachtoubdji)\
**Post date:** [February 18, 2026, 12:12pm UTC](https://forum.inductiveautomation.com/t/perspective-session-switch-and-pass-login-credentials-across-gateways/55109/4 "2026-02-18T12:12:15Z")

</div>

I am experiencing the same issue described in this post. However, rather than transferring credentials, my goal is simply to trigger a login at a specific access level in order to retrieve the “Diagnostic Bundle.”

I was able to identify the URL that initiates the download, and it functions correctly when the Gateway is already logged in with the appropriate access level. However, once the Gateway session logs out, access to the download URL is blocked, which is expected behavior.

Is there an alternative method to trigger the Diagnostic Bundle from Perspective using a different approach that I may be overlooking?

Worth note that I am using version 8.1.4, so I am unsure whether the same solution applies to newer versions.

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [February 18, 2026, 6:38pm UTC](https://forum.inductiveautomation.com/t/perspective-session-switch-and-pass-login-credentials-across-gateways/55109/5 "2026-02-18T18:38:04Z")

</div>

With 8.3 you'd be able to pre-generate an API key and use that to call the HTTP route from scripting or an HTTP binding, though you would have to be careful not to 'leak' your API key.

In 8.1 or 8.3, if you use scripting to get access to a `GatewayContext` object (examples abound on the forums), then [get the `DiagnosticsManager`](https://files.inductiveautomation.com/sdk/javadoc/ignition81/8.1.52/com/inductiveautomation/ignition/gateway/model/GatewayContext.html#getDiagnosticsManager()), you can [retrieve or generate a `DiagnosticBundle`](https://files.inductiveautomation.com/sdk/javadoc/ignition81/8.1.52/com/inductiveautomation/ignition/gateway/model/DiagnosticsManager.html#getDiagnosticsBundle()) which exposes a [`CompletableFuture<File>`](https://files.inductiveautomation.com/sdk/javadoc/ignition81/8.1.52/com/inductiveautomation/ignition/gateway/model/DiagnosticsManager.DiagnosticsBundle.html#getBundleFile()), essentially a non-blocking reference to a file (eventually).

I'm not providing exact instructions on how to get a `GatewayContext`, because doing so is:

1. Explicitly unsupported. Anything you do that relies on importing an internal Ignition class is subject to change without notice between Ignition versions
2. Potentially risky. From a gateway context reference, you have access to a variety of internal subsystems that you could use to completely break your gateway.

---

<div class="post-metadata">

**Author:** ![Elias.Bachtoubdji](https://avatars.discourse-cdn.com/v4/letter/e/90db22/32.png) [@Elias.Bachtoubdji](https://forum.inductiveautomation.com/u/Elias.Bachtoubdji)\
**Post date:** [February 19, 2026, 9:45am UTC](https://forum.inductiveautomation.com/t/perspective-session-switch-and-pass-login-credentials-across-gateways/55109/6 "2026-02-19T09:45:21Z")

</div>

I’ve done some digging on how to obtain a `GatewayContext`, and every example I’ve found comes with a clear warning about the potential risks and the fact that it’s unsupported.

The sole purpose of putting this behind a scripted button is simply to reduce user interaction with the Gateway — just to allow maintenance staff to generate and download the diagnostic bundle from a Perspective session.

If there’s any real risk of breaking the Gateway by relying on internal classes, then it’s definitely better to stay away from that approach.  
This is more a “nice to have” feature rather than “most have”.

---

<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:** [February 19, 2026, 2:12pm UTC](https://forum.inductiveautomation.com/t/perspective-session-switch-and-pass-login-credentials-across-gateways/55109/7 "2026-02-19T14:12:58Z")

</div>

> [@Elias.Bachtoubdji](#):
>
> relying on internal classes

Us module developers do it all the time. The risk is that there are no, or fewer, guard rails.

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [February 19, 2026, 5:54pm UTC](https://forum.inductiveautomation.com/t/perspective-session-switch-and-pass-login-credentials-across-gateways/55109/8 "2026-02-19T17:54:00Z")

</div>

To be clear, if you stick to doing what I suggested it's ~zero risk. All you're doing is running a script that does the same thing as clicking the button does. I just want to emphasize not to go gallivanting around, because that _could_ lead to problems.
