restrict google drive sign in to company mail

expand collapsive

Hey, we are using google drive for storing and sharing business data in the company. I recently noticed that one of our staff has set up his personal account on the google drive app. So, I’ll have to limit the app to only companies’ email. Please provide a solution.
Device: mac book pro (13-inch, m1)

All Replies

  • Hexnode

    Evin Lee


    @nienke, Thanks for reaching out to us.

    You can configure the Google Drive app such that only users in your company’s domain can sign in to the app. Hence, employees will not be able to log in to the app with their personal mail. You can do the job by executing scripts or installing custom configuration profiles on your macOS devices.
    So, here is the script to restrict the Google Drive app with a domain of your choice.

    Provide your domain name instead of ‘gmail’.

    You can seamlessly deploy the script to required devices via the Hexnode portal. Check out our help doc on executing custom scripts on macOS devices to learn more.
    If you prefer installing a custom profile to do the task, please use the XML file below to deploy the custom configuration profile to your macOS devices using Hexnode.

    Replace ‘gmail’ with your domain name.

    After executing the script/deploying custom configuration, restart the devices for the changes to take effect. Please don’t be concerned about manually restarting all of the devices, you can easily do it from the Hexnode portal. To restart your devices remotely, go to Manage > Devices, select your Mac devices, and click Restart Device from the Actions drop-down menu.

    Please try to validate the script/XML file on a system before executing in bulk. Because if there are any issues with the script/XML file, it may put your devices at risk.

    Hope this helps. Do reach out if you have any further queries.

    Evin Lee
    Hexnode UEM

  • Participant



    I executed the script on our devices. When I tried to login to the google drive app using my personal mail, it showed “Your organization doesn’t allow Google Drive to be used with email.” However, Iam able to access drive from safari.

  • Hexnode

    Evin Lee


    Hi @nienke,

    Thanks for reaching out to us.

    The script only writes the preferences for the Google Drive app, and it doesn’t apply to Safari. However, you can block employees from accessing Google Drive through the Safari web browser using the web content filtering feature on Hexnode. And, here is what you need to do.

    1. Head on to Policies > macOS > Security > Web Content Filtering on the Hexnode portal.
    2. Select Filter Type as Blacklist, and provide the URL on the field below Blacklist Web URLs. Then, click on Add.
    3. Associate the policy with your Mac devices.

    Have a look at web content filtering on macOS devices to know more.

    Hope this answers your query.
    Evin Lee
    Hexnode UEM