Google Apps Marketplace SDK + Domain-wide OAuth 2 SSO

Can you share the code with which you are asking for authorization?

9 out of 10 times, if each user in the domain is getting prompted, that is because you are asking for “offline” access. Domain wide authorization cannot be done for offline access. In Python for instance, you can do that like this –

constructor_kwargs = {
    'redirect_uri': GOOGLE_AUTH_CALLBACK_URL,
    'auth_uri': client_info['auth_uri'],
    'token_uri': client_info['token_uri'],
    'access_type' : 'online'
}

flow = OAuth2WebServerFlow(client_info['client_id'], 
               client_info['client_secret'],
                   SCOPES, **constructor_kwargs)

Leave a Comment