<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-M74D8PB" height="0" width="0" style="display:none;visibility:hidden">
Loading
Skip to NavigationSkip to Main Content
How to Utilize API Connector and OAuth2 to Connect to Cloudresourcemanager.googleapis.com API Endpoint and Refresh an Access Token
Workflows
Overview

The following provides steps for setting up API access using the Workflows API Connector card and OAuth to connect to the Resource Manager API in Google Cloud Platform. 

This also includes information on how to set up the connection to obtain a Refresh Token when accessing the Google API, which is done by adding a query parameter to the Authorize Path when configuring the Custom API Connector.

 

NOTE: This process will likely work with other cloud.google.com API endpoints, assuming they are enabled and the proper scopes are utilized.

Applies To
  • Okta Workflows
  • Google Cloud Platform APIs
Solution
  1. Log into the Google Cloud Platform console.
  2. Follow the instructions at Create a client ID and client secret to create a Webapp.
    1. For the Redirect URI, use the following Redirect URIs for Workflows Preview and Production orgs, respectively:
      1. Preview: https://oauth.workflows.oktapreview.com/oauth/httpfunctions/cb
      2. Production: https://oauth.workflows.okta.com/oauth/httpfunctions/cb
  3. Record the Client ID and Client Secret after completing the previous step.
  4. Navigate to Cloud Resource Manager API and enable it.
  5. Log into the Okta Workflows console
  6. Click Connections > New Connection > API Connector.
  7. Provide a name, and select Auth Type (Oauth).
  8. Provide the following:
  9. Click Create. There will be a prompt to log into Google and to grant access.

At this point, access should be successful. To confirm, the following method can be used: GET to the following API Endpoint to list all Google Cloud Projects attached to the account: API Endpoint.

 

Related References

Loading
How to Utilize API Connector and OAuth2 to Connect to Cloudresourcemanager.googleapis.com API Endpoint and Refresh an Access Token