# Using Plugin to modify the user group but reload when user connect

**URL:** <https://forum.pritunl.com/t/using-plugin-to-modify-the-user-group-but-reload-when-user-connect/605>\
**Category:** Pritunl\
**Tags:** pritunl\
**Created:** [December 7, 2022, 7:25am UTC](https://forum.pritunl.com/t/using-plugin-to-modify-the-user-group-but-reload-when-user-connect/605 "2022-12-07T07:25:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![andrewli315](https://forum.pritunl.com/user_avatar/forum.pritunl.com/andrewli315/32/244_2.png) [@andrewli315](https://forum.pritunl.com/u/andrewli315)\
**Post date:** [December 7, 2022, 7:25am UTC](https://forum.pritunl.com/t/using-plugin-to-modify-the-user-group-but-reload-when-user-connect/605/1 "2022-12-07T07:25:34Z")

</div>

I write a script to modify the user groups and enable the google sso group mode. I want to create a custom groups for user and vpn server. However, when I connect to VPN via pritunl, the user’s group will be erase and renew for user’s google group. Is there any suggestion to prevent this or I can override the sso authentication ?

---

<div class="post-metadata">

**Author:** ![zach](https://forum.pritunl.com/user_avatar/forum.pritunl.com/zach/32/1105_2.png) [@zach](https://forum.pritunl.com/u/zach)\
**Post date:** [December 7, 2022, 11:35pm UTC](https://forum.pritunl.com/t/using-plugin-to-modify-the-user-group-but-reload-when-user-connect/605/2 "2022-12-07T23:35:54Z")

</div>

The `sso_authenticate` [**plugin handler**](https://docs.pritunl.com/docs/plugins) can return user groups. These groups are merged with the groups provided by the single sign-on provider.
