belteshazzar
belteshazzar

Reputation: 2213

GAE Python: Control access based on GSuite group

Is it possible to control access to a request handler entirely or some parts therein based on what GSuite for Education/Business group a user belongs to?

Upvotes: 0

Views: 231

Answers (1)

Dan Cornilescu
Dan Cornilescu

Reputation: 39834

It is possible to have code check the GSuite group membership using the Directory API from the Google Apps Admin SDK. You'd probably be interested in one of:

You'll need to

G Suite administrators have access to the Admin SDK–a collection of Application Programming Interfaces (APIs). With these APIs, you can build customized administrative tools for your G Suite products. Before you can use the Admin SDK, you need to enable API access in the Google Admin console.

You must be signed in as a super administrator for this task. Enable API access

To verify that API access is enabled:

  1. Sign in to your Google Admin console.

    Sign in using an administrator account, not your current account [email protected].

  2. From the Admin console dashboard, go to Security > API reference.

    To see Security on the dashboard, you might have to click More controls at the bottom.

  3. Make sure the Enable API access box is checked.

  4. At the bottom, click Save.

Upvotes: 1

Related Questions