Search code examples
google-cloud-platformgoogle-cloud-iamgoogle-iap

Google Cloud - strange response from IAP.GetIamPolicy API


I'm doing a POST to https://iap.googleapis.com/v1/projects/MY_PROJECT_ID/iap_web:getIamPolicy with an empty body as the documentation specifies.

The API response is an HTTP 200 with the body simply being {"etag": "ACAB"}

What does this mean? What should I be doing differently to retrieve the actual policy data?

IAP and the IAP API are both enabled for this project.


Solution

  • The issue is that your URI is not specifying the Resource Type, which can be app-engine or backend-services.

    For App Engine change the URI to:

    https://iap.googleapis.com/v1beta1/projects/PROJECT_NUMBER/iap_web/appengine-PROJECT_ID:getIamPolicy?alt=json