Using special URLs

This page describes how to use Cloud Identity-Aware Proxy (Cloud IAP) special URLs to enhance your application UI or provide troubleshooting options.

Passing user identity

The following URL returns a JSON dictionary with the user's identity:

YOUR_APP_URL/_gcp_iap/identity

This URL is available from any signed-in Google account, even if the account doesn't have access to the app. You can navigate to the URL directly or you can reference it to make requests to the URL. Following is an example value returned by the URL:

{"email":"accounts.google.com:USER_EMAIL","sub":"accounts.google.com:118133858486581853996"}

You might find this value useful to personalize your app, such as by displaying the user's name, to pass identity to another page, or capture usage data in logs.

Clearing user login

The following URL clears the Cloud IAP login cookie:

YOUR_APP_URL/_gcp_iap/clear_login_cookie

By default, this URL is linked from the 403 page to help users who might be signed in to the wrong place. You can also provide the URL to a user who gets stuck, or use it to enable profile switching in your application.

Send feedback about...

Identity-Aware Proxy Documentation