# Authentication Strategy. Vision. Switch User

**URL:** <https://forum.inductiveautomation.com/t/authentication-strategy-vision-switch-user/41915>\
**Category:** Ignition\
**Tags:** vision, ignition80\
**Created:** [January 4, 2021, 8:54am UTC](https://forum.inductiveautomation.com/t/authentication-strategy-vision-switch-user/41915 "2021-01-04T08:54:03Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![iscrac](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/iscrac/32/49757_2.png) [@iscrac](https://forum.inductiveautomation.com/u/iscrac)\
**Post date:** [January 4, 2021, 8:54am UTC](https://forum.inductiveautomation.com/t/authentication-strategy-vision-switch-user/41915/1 "2021-01-04T08:54:03Z")

</div>

Hi Everyone,

I’ve changed Authentication Strategy to IDENTITY\_PROVIDER and now I can’t change the user…

`system.security.switchUser()` doesn’ work for me now…

How should I switch user then? 👤

Thanx in Advance.

---

<div class="post-metadata">

**Author:** ![JordanCClark](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jordancclark/32/83362_2.png) [@JordanCClark](https://forum.inductiveautomation.com/u/JordanCClark)\
**Post date:** [January 4, 2021, 11:29am UTC](https://forum.inductiveautomation.com/t/authentication-strategy-vision-switch-user/41915/2 "2021-01-04T11:29:15Z")

</div>

EDIT: nvm, what I was thinking doesn’t apply here.

---

<div class="post-metadata">

**Author:** ![iscrac](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/iscrac/32/49757_2.png) [@iscrac](https://forum.inductiveautomation.com/u/iscrac)\
**Post date:** [January 4, 2021, 12:10pm UTC](https://forum.inductiveautomation.com/t/authentication-strategy-vision-switch-user/41915/3 "2021-01-04T12:10:10Z")

</div>

so does it mean that this function is disabled in this case?  
Should I first logout and then login again?

---

<div class="post-metadata">

**Author:** ![JordanCClark](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jordancclark/32/83362_2.png) [@JordanCClark](https://forum.inductiveautomation.com/u/JordanCClark)\
**Post date:** [January 4, 2021, 12:31pm UTC](https://forum.inductiveautomation.com/t/authentication-strategy-vision-switch-user/41915/4 "2021-01-04T12:31:51Z")

</div>

My thinking was in using the perspective functions, but since it’s on a vision client, the scope differs than it would be in perspective. It’s why I said it wouldn’t apply. 😉

---

<div class="post-metadata">

**Author:** ![iscrac](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/iscrac/32/49757_2.png) [@iscrac](https://forum.inductiveautomation.com/u/iscrac)\
**Post date:** [January 4, 2021, 12:35pm UTC](https://forum.inductiveautomation.com/t/authentication-strategy-vision-switch-user/41915/5 "2021-01-04T12:35:46Z")

</div>

> [@JordanCClark](#):
>
> but since it’s on a vision client, the scope differs than it would be in perspective.

oh yeah... I though the same way and tried to do this, but yeah, it is in Vision, so it's not working...

ok then... I hope it will not make trouble to the client... 🙈

---

<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:** [January 4, 2021, 6:26pm UTC](https://forum.inductiveautomation.com/t/authentication-strategy-vision-switch-user/41915/6 "2021-01-04T18:26:49Z")

</div>

There should be an error logging to the gateway every time you attempt to `switchUser` with the IdP authentication strategy.  
Fundamentally, identity providers have certain limitations, dictated by the standard, that preclude some of the existing Vision login functionality from working.

---

<div class="post-metadata">

**Author:** ![iscrac](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/iscrac/32/49757_2.png) [@iscrac](https://forum.inductiveautomation.com/u/iscrac)\
**Post date:** [January 5, 2021, 6:26am UTC](https://forum.inductiveautomation.com/t/authentication-strategy-vision-switch-user/41915/7 "2021-01-05T06:26:44Z")

</div>

> [@paul-griffith](#):
>
> Fundamentally, identity providers have certain limitations, dictated by the standard, that preclude some of the existing Vision login functionality from working.

That's clear now. Thanx for Your answer 🙂
