> ## Documentation Index
> Fetch the complete documentation index at: https://docs.safesquid.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Block Particular User Login to Facebook or Gmail

> Block specific users from logging into Facebook or Gmail via SafeSquid for controlled organizational access.

## Problem

Security teams need predictable control over app and web usage to reduce policy bypass and data-risk exposure.

## Benefits

You can enforce policy decisions consistently with SafeSquid while preserving legitimate business workflows.

## Advantages

You keep actionable policy control close to operations, with verifiable outcomes in logs and policy behavior.

## Call to action

Use the steps in this guide to implement the control, then validate behavior with a real user-flow test.

# Block specific users from logging into Facebook or Gmail

Restrict which users can log into Facebook or Gmail; only selected users can log in; all others are blocked.

## Prerequisites

HTTPS Inspection should be enabled in SafeSquid. If not enabled, see the document - [How to enable HTTPS Inspection](/SSL_Inspection).

## [Access the SafeSquid User Interface](/Configuration_Portal)

<img src="https://mintcdn.com/safe-squid-labs-12a0916f/RBjPd0RQsKIeayde/images/How_To/Block_Particular_User_Login_To_Facebook_Or_Gmail/image1.webp?fit=max&auto=format&n=RBjPd0RQsKIeayde&q=85&s=5bf02d7bcec3517dfc095f90a5df20d1" alt="click on configure in safesquid interface" width="1280" height="720" data-path="images/How_To/Block_Particular_User_Login_To_Facebook_Or_Gmail/image1.webp" />

## Go to Search

<img src="https://mintcdn.com/safe-squid-labs-12a0916f/RBjPd0RQsKIeayde/images/How_To/Block_Particular_User_Login_To_Facebook_Or_Gmail/image2.webp?fit=max&auto=format&n=RBjPd0RQsKIeayde&q=85&s=e04f4e351810810014ea93f13ffc689c" alt="click on search in access profiles section" width="1269" height="714" data-path="images/How_To/Block_Particular_User_Login_To_Facebook_Or_Gmail/image2.webp" />

## Search policy: "BLOCK PARTICULAR USER LOGIN"

<img src="https://mintcdn.com/safe-squid-labs-12a0916f/RBjPd0RQsKIeayde/images/How_To/Block_Particular_User_Login_To_Facebook_Or_Gmail/image3.webp?fit=max&auto=format&n=RBjPd0RQsKIeayde&q=85&s=1443085887033b7d3c15824b0f85fc6d" alt="search for &#x22; BLOCK PARTICULAR USER LOGIN &#x22; default policy" width="1280" height="720" data-path="images/How_To/Block_Particular_User_Login_To_Facebook_Or_Gmail/image3.webp" />

## Go to Content Modifier: Rewrite Policies

<img src="https://mintcdn.com/safe-squid-labs-12a0916f/RBjPd0RQsKIeayde/images/How_To/Block_Particular_User_Login_To_Facebook_Or_Gmail/image4.webp?fit=max&auto=format&n=RBjPd0RQsKIeayde&q=85&s=90d1b115a52ce37ba17153e1bf13289b" alt="showing search results for &#x22;BLOCK PARTICULAR USER LOGIN &#x22; in Content modifier section" width="1280" height="720" data-path="images/How_To/Block_Particular_User_Login_To_Facebook_Or_Gmail/image4.webp" />

<img src="https://mintcdn.com/safe-squid-labs-12a0916f/RBjPd0RQsKIeayde/images/How_To/Block_Particular_User_Login_To_Facebook_Or_Gmail/image5.webp?fit=max&auto=format&n=RBjPd0RQsKIeayde&q=85&s=393d85d8f6fdcb364b0d6aaa99014b5e" alt="click on content modifier from the sidebar under Real Time content Security" width="1280" height="720" data-path="images/How_To/Block_Particular_User_Login_To_Facebook_Or_Gmail/image5.webp" />

## Ensure Global Section with Enabled TRUE

<img src="https://mintcdn.com/safe-squid-labs-12a0916f/RBjPd0RQsKIeayde/images/How_To/Block_Particular_User_Login_To_Facebook_Or_Gmail/image6.webp?fit=max&auto=format&n=RBjPd0RQsKIeayde&q=85&s=537c553467de057c7a737569bc63ae09" alt="ensuring the global section set as true" width="1280" height="720" data-path="images/How_To/Block_Particular_User_Login_To_Facebook_Or_Gmail/image6.webp" />

<img src="https://mintcdn.com/safe-squid-labs-12a0916f/RBjPd0RQsKIeayde/images/How_To/Block_Particular_User_Login_To_Facebook_Or_Gmail/image7.webp?fit=max&auto=format&n=RBjPd0RQsKIeayde&q=85&s=53bdd472f5d7a98d7b5cb2d8d276bde7" alt="selecting true in global if it is set to false " width="1280" height="720" data-path="images/How_To/Block_Particular_User_Login_To_Facebook_Or_Gmail/image7.webp" />

<img src="https://mintcdn.com/safe-squid-labs-12a0916f/RBjPd0RQsKIeayde/images/How_To/Block_Particular_User_Login_To_Facebook_Or_Gmail/image8.webp?fit=max&auto=format&n=RBjPd0RQsKIeayde&q=85&s=ccb808c93474b6cb3ebeb8ffd7c1cf9a" alt="click on submit to save the policy" width="1280" height="720" data-path="images/How_To/Block_Particular_User_Login_To_Facebook_Or_Gmail/image8.webp" />

## Go to Rewrite Policies and make it Enable

<img src="https://mintcdn.com/safe-squid-labs-12a0916f/RBjPd0RQsKIeayde/images/How_To/Block_Particular_User_Login_To_Facebook_Or_Gmail/image9.webp?fit=max&auto=format&n=RBjPd0RQsKIeayde&q=85&s=1e6d529f77c25297ad6c0eac0d2dfa89" alt="going in &#x22;Rewriting policies &#x22; to enable &#x22;BLOCK PARTICULAR USER LOGIN&#x22; policy" width="1280" height="720" data-path="images/How_To/Block_Particular_User_Login_To_Facebook_Or_Gmail/image9.webp" />

<img src="https://mintcdn.com/safe-squid-labs-12a0916f/RBjPd0RQsKIeayde/images/How_To/Block_Particular_User_Login_To_Facebook_Or_Gmail/image10.webp?fit=max&auto=format&n=RBjPd0RQsKIeayde&q=85&s=0397c4e9b3930d2b37163b9a26275489" alt="editing the policy" width="1280" height="720" data-path="images/How_To/Block_Particular_User_Login_To_Facebook_Or_Gmail/image10.webp" />

<img src="https://mintcdn.com/safe-squid-labs-12a0916f/RBjPd0RQsKIeayde/images/How_To/Block_Particular_User_Login_To_Facebook_Or_Gmail/image11.webp?fit=max&auto=format&n=RBjPd0RQsKIeayde&q=85&s=e496d754d3cd68ca71fb9b7de5eed5c2" alt="setting true value in enabled " width="1280" height="720" data-path="images/How_To/Block_Particular_User_Login_To_Facebook_Or_Gmail/image11.webp" />

## Enter Username inside Pattern

<img src="https://mintcdn.com/safe-squid-labs-12a0916f/RBjPd0RQsKIeayde/images/How_To/Block_Particular_User_Login_To_Facebook_Or_Gmail/image12.webp?fit=max&auto=format&n=RBjPd0RQsKIeayde&q=85&s=19405b7b14f45d3792a4af55f6b8032c" alt="entering the desired username pattern" width="1280" height="720" data-path="images/How_To/Block_Particular_User_Login_To_Facebook_Or_Gmail/image12.webp" />

<img src="https://mintcdn.com/safe-squid-labs-12a0916f/RBjPd0RQsKIeayde/images/How_To/Block_Particular_User_Login_To_Facebook_Or_Gmail/image13.webp?fit=max&auto=format&n=RBjPd0RQsKIeayde&q=85&s=b6fea8ac3c7a88642b348eaab03c2d1e" alt="click on save to save the policy" width="1280" height="720" data-path="images/How_To/Block_Particular_User_Login_To_Facebook_Or_Gmail/image13.webp" />

## Search policy: "BLOCK PARTICULAR USER LOGIN"

<img src="https://mintcdn.com/safe-squid-labs-12a0916f/RBjPd0RQsKIeayde/images/How_To/Block_Particular_User_Login_To_Facebook_Or_Gmail/image14.webp?fit=max&auto=format&n=RBjPd0RQsKIeayde&q=85&s=2c41a71cba96d2e8df8581a2991beee3" alt="searching for policy &#x22;BLOCK PARTICULAR USER LOGIN &#x22; " width="1280" height="720" data-path="images/How_To/Block_Particular_User_Login_To_Facebook_Or_Gmail/image14.webp" />

## Go to Access Profiles to Enable

<img src="https://mintcdn.com/safe-squid-labs-12a0916f/RBjPd0RQsKIeayde/images/How_To/Block_Particular_User_Login_To_Facebook_Or_Gmail/image15.webp?fit=max&auto=format&n=RBjPd0RQsKIeayde&q=85&s=35fcd9560dc21778ea781556a08e2b96" alt="going to access profile to enable the policy" width="1280" height="720" data-path="images/How_To/Block_Particular_User_Login_To_Facebook_Or_Gmail/image15.webp" />

<img src="https://mintcdn.com/safe-squid-labs-12a0916f/RBjPd0RQsKIeayde/images/How_To/Block_Particular_User_Login_To_Facebook_Or_Gmail/image16.webp?fit=max&auto=format&n=RBjPd0RQsKIeayde&q=85&s=94d8c8c7ac71b30f20b2b1fad621969a" alt="clicking on edit policy to edit the policy" width="1280" height="720" data-path="images/How_To/Block_Particular_User_Login_To_Facebook_Or_Gmail/image16.webp" />

<img src="https://mintcdn.com/safe-squid-labs-12a0916f/RBjPd0RQsKIeayde/images/How_To/Block_Particular_User_Login_To_Facebook_Or_Gmail/image17.webp?fit=max&auto=format&n=RBjPd0RQsKIeayde&q=85&s=c823dcc999810d8c6fba9f4b27048dee" alt="selecting true to enable it" width="1280" height="720" data-path="images/How_To/Block_Particular_User_Login_To_Facebook_Or_Gmail/image17.webp" />

<img src="https://mintcdn.com/safe-squid-labs-12a0916f/RBjPd0RQsKIeayde/images/How_To/Block_Particular_User_Login_To_Facebook_Or_Gmail/image18.webp?fit=max&auto=format&n=RBjPd0RQsKIeayde&q=85&s=5db1600b1635480c8343f25c2fa38ef4" alt="save the policy" width="1280" height="720" data-path="images/How_To/Block_Particular_User_Login_To_Facebook_Or_Gmail/image18.webp" />

## To test

Go to Facebook and Login

Try login to your Facebook account it will show you the below page:

<img src="https://mintcdn.com/safe-squid-labs-12a0916f/RBjPd0RQsKIeayde/images/How_To/Block_Particular_User_Login_To_Facebook_Or_Gmail/image19.webp?fit=max&auto=format&n=RBjPd0RQsKIeayde&q=85&s=e51c4bdf8f2f7eea11d72a1f85d66247" alt="testing the policy" width="988" height="602" data-path="images/How_To/Block_Particular_User_Login_To_Facebook_Or_Gmail/image19.webp" />

### Go to Gmail and login

Try login to your Gmail account it will show you the below page:

<img src="https://mintcdn.com/safe-squid-labs-12a0916f/RBjPd0RQsKIeayde/images/How_To/Block_Particular_User_Login_To_Facebook_Or_Gmail/image20.webp?fit=max&auto=format&n=RBjPd0RQsKIeayde&q=85&s=157b42a30d9ca5a7d19473e104d121cc" alt="testing the policy by login" width="616" height="596" data-path="images/How_To/Block_Particular_User_Login_To_Facebook_Or_Gmail/image20.webp" />


## Related topics

- [Login Issues on Specific Websites](/troubleshooting/unable_to_login_specific_website.md)
- [Facebook Read Only Mode](/use_cases/content_modifier/facebook_read_only_mode.md)
- [Allow Specific Page on Facebook](/use_cases/content_modifier/allowing_specific_page_on_facebook.md)
- [Block Personal Gmail, Allow Google Corporate Accounts](/use_cases/header_rewrite/block_personal_gmail_allow_google_corporate_accounts.md)
- [Allow Remote Applications to Particular Users](/use_cases/access_restriction/allow_remote_applications_to_particular_users.md)
