# With Google SSO, we are struggling to integrate Pritunl with Google Groups

**URL:** <https://forum.pritunl.com/t/with-google-sso-we-are-struggling-to-integrate-pritunl-with-google-groups/838>\
**Category:** Pritunl VPN\
**Created:** [March 9, 2023, 3:52am UTC](https://forum.pritunl.com/t/with-google-sso-we-are-struggling-to-integrate-pritunl-with-google-groups/838 "2023-03-09T03:52:05Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![arun\_singh](https://forum.pritunl.com/letter_avatar_proxy/v4/letter/a/8baadc/32.png) [@arun\_singh](https://forum.pritunl.com/u/arun_singh)\
**Post date:** [March 9, 2023, 3:52am UTC](https://forum.pritunl.com/t/with-google-sso-we-are-struggling-to-integrate-pritunl-with-google-groups/838/1 "2023-03-09T03:52:05Z")

</div>

Can you please help or share some articles which would help?  
Please note that we referred to [Google](https://docs.pritunl.com/docs/google) while setting up the same. However, it was not helpful to set it up with Google groups.

Use case: Enable Pritunl SSO only to a specific group of people (configured in google groups)

---

<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:** [March 9, 2023, 5:47pm UTC](https://forum.pritunl.com/t/with-google-sso-we-are-struggling-to-integrate-pritunl-with-google-groups/838/2 "2023-03-09T17:47:45Z")

</div>

Google Workspace doesn’t have the same level of user access controls that traditional single sign-on platforms have. The best option for Google is to create an organization in Pritunl and configure it as the default single sign-on organization. Then leave this organization unattached to any servers. Organizations matching the names of Google groups can then be created and those can be attached to servers. Users not in the groups will not be able to connect to a VPN server.

---

<div class="post-metadata">

**Author:** ![arun\_singh](https://forum.pritunl.com/letter_avatar_proxy/v4/letter/a/8baadc/32.png) [@arun\_singh](https://forum.pritunl.com/u/arun_singh)\
**Post date:** [March 13, 2023, 3:43pm UTC](https://forum.pritunl.com/t/with-google-sso-we-are-struggling-to-integrate-pritunl-with-google-groups/838/3 "2023-03-13T15:43:37Z")

</div>

Hi Zach,

I think I followed as you suggested but getting “No server profiles are available on this account” error. I will describe steps I did.

1. Created a Google group with name Tech at [https://groups.google.com/my-groups](https://groups.google.com/my-groups)
2. Create New Org with name Tech in Pritunl.
3. Created one more org NonTech in Pritunl.
4. Changed default SSO org to NonTech and NonTech is not attached to any servers.
5. Attached Tech Org to Server.
6. Tried to authenticate with my Google email and getting error “No server profiles are available on this account”
7. I have made sure my user part of Tech group in Google Groups.
8. after authentication my user list under NonTech org.

Can you help me understand what I’m missing?

---

<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:** [March 13, 2023, 4:29pm UTC](https://forum.pritunl.com/t/with-google-sso-we-are-struggling-to-integrate-pritunl-with-google-groups/838/4 "2023-03-13T16:29:19Z")

</div>

Verify that the Groups option in the server settings is not set. This is a separate groups mode that requires also configuring user groups to match. This mode should only be used when required and can be enabled by running `sudo pritunl set app.sso_google_mode '"groups"'`.

---

<div class="post-metadata">

**Author:** ![arun\_singh](https://forum.pritunl.com/letter_avatar_proxy/v4/letter/a/8baadc/32.png) [@arun\_singh](https://forum.pritunl.com/u/arun_singh)\
**Post date:** [March 13, 2023, 5:05pm UTC](https://forum.pritunl.com/t/with-google-sso-we-are-struggling-to-integrate-pritunl-with-google-groups/838/5 "2023-03-13T17:05:57Z")

</div>

Hi Zach,

This doesn’t not help in fixing issue. Attaching you screenshots.

Enabled groups option using priutnl command you mentioned and no groups is specified in server setting, still getting same error message.

 ![Screenshot 2023-03-13 at 10.33.34 PM](https://forum-static.pritunl.com/original/1X/3656c3eb509687def9c99d68c0dbd92526d60cbb.png)  
 ![Screenshot 2023-03-13 at 10.33.13 PM](https://forum-static.pritunl.com/original/1X/b6ec23c243700fd96240110beb78251552d8339b.png)

---

<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:** [March 13, 2023, 5:15pm UTC](https://forum.pritunl.com/t/with-google-sso-we-are-struggling-to-integrate-pritunl-with-google-groups/838/6 "2023-03-13T17:15:31Z")

</div>

That command shouldn’t be used to fix the issue, only to switch to the groups mode. If you are not intending on using the groups mode run `sudo pritunl unset app.sso_google_mode`. First verify the user is in the correct organization and check the title at the top of the profile page after authenticating which will show the organization name. Then verify this organization is attached to a server. Do not attempt to create the single sign-on user manually, this will create a local type user. The user should be created by the Pritunl server during the single sign-on authentication.

---

<div class="post-metadata">

**Author:** ![arun\_singh](https://forum.pritunl.com/letter_avatar_proxy/v4/letter/a/8baadc/32.png) [@arun\_singh](https://forum.pritunl.com/u/arun_singh)\
**Post date:** [March 13, 2023, 5:49pm UTC](https://forum.pritunl.com/t/with-google-sso-we-are-struggling-to-integrate-pritunl-with-google-groups/838/7 "2023-03-13T17:49:37Z")

</div>

Hi Zach,

I have reverted group changes using unset option still same issue. I have tried to do auth again but same issue. I have not created user manually.

I’m attaching pdf with all screenshots can you help me understand how to fix this.

[https://drive.google.com/file/d/1wH-vYSUXPB9oIs2rGAbY0Xo7HMTvanc0/view?usp=sharing](https://drive.google.com/file/d/1wH-vYSUXPB9oIs2rGAbY0Xo7HMTvanc0/view?usp=sharing)

---

<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:** [March 14, 2023, 2:34am UTC](https://forum.pritunl.com/t/with-google-sso-we-are-struggling-to-integrate-pritunl-with-google-groups/838/8 "2023-03-14T02:34:34Z")

</div>

Check the logs in the top right, this will show a message reporting what group names were provided by the single sign-on provider.

---

<div class="post-metadata">

**Author:** ![arun\_singh](https://forum.pritunl.com/letter_avatar_proxy/v4/letter/a/8baadc/32.png) [@arun\_singh](https://forum.pritunl.com/u/arun_singh)\
**Post date:** [March 14, 2023, 3:59am UTC](https://forum.pritunl.com/t/with-google-sso-we-are-struggling-to-integrate-pritunl-with-google-groups/838/9 "2023-03-14T03:59:06Z")

</div>

Hi Zach,

I can only see this message in logs. nothing more.

[tunnel-a][2023-03-14 09:26:23,223][INFO] User organization changed, moving user  
user\_name = “[arun.singh@kissht.com](mailto:arun.singh@kissht.com)”  
user\_email = “[arun.singh@kissht.com](mailto:arun.singh@kissht.com)”  
remote\_ip = “103.188.218.122”  
cur\_org\_id = “63f3618a38ce”  
new\_org\_id = “640f4252aa5915d”

and server start and stop logs. I have turned on Debug log but still this much log I’m getting.

---

<div class="post-metadata">

**Author:** ![arun\_singh](https://forum.pritunl.com/letter_avatar_proxy/v4/letter/a/8baadc/32.png) [@arun\_singh](https://forum.pritunl.com/u/arun_singh)\
**Post date:** [March 14, 2023, 8:09am UTC](https://forum.pritunl.com/t/with-google-sso-we-are-struggling-to-integrate-pritunl-with-google-groups/838/10 "2023-03-14T08:09:22Z")

</div>

Hi Zach,

i’m not sure if i’m doing something wrong at Google Apps end or Pritunl but single sign on not working for selected group.Can you help things I need to check at google end also?

---

<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:** [March 14, 2023, 11:42am UTC](https://forum.pritunl.com/t/with-google-sso-we-are-struggling-to-integrate-pritunl-with-google-groups/838/11 "2023-03-14T11:42:46Z")

</div>

You may be missing one of the required values in the top right settings. Matching groups requires the Google Admin Email and Google JSON Private Key.

---

<div class="post-metadata">

**Author:** ![arun\_singh](https://forum.pritunl.com/letter_avatar_proxy/v4/letter/a/8baadc/32.png) [@arun\_singh](https://forum.pritunl.com/u/arun_singh)\
**Post date:** [March 14, 2023, 12:49pm UTC](https://forum.pritunl.com/t/with-google-sso-we-are-struggling-to-integrate-pritunl-with-google-groups/838/12 "2023-03-14T12:49:40Z")

</div>

Hi Zach,

I have Google Json private key and email id. Things works fine without group option. But we want to restrict vpn for selected group that we are unable to do.

 ![Screenshot 2023-03-14 at 6.17.45 PM](https://forum-static.pritunl.com/original/1X/91470ca105b84cfe108a15f29decf316acea8a65.png)

---

<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:** [March 14, 2023, 12:51pm UTC](https://forum.pritunl.com/t/with-google-sso-we-are-struggling-to-integrate-pritunl-with-google-groups/838/13 "2023-03-14T12:51:42Z")

</div>

Run `sudo pritunl get app.sso_google_mode` and verify it is set to `org`.

---

<div class="post-metadata">

**Author:** ![arun\_singh](https://forum.pritunl.com/letter_avatar_proxy/v4/letter/a/8baadc/32.png) [@arun\_singh](https://forum.pritunl.com/u/arun_singh)\
**Post date:** [March 14, 2023, 2:20pm UTC](https://forum.pritunl.com/t/with-google-sso-we-are-struggling-to-integrate-pritunl-with-google-groups/838/14 "2023-03-14T14:20:39Z")

</div>

Hi Zach,

Thank you very much this fixed issue. We are now able to control which group have access to VPN Server. Thanks for patience and continue replies.
