I want to use the project.getIamPolicy and setIamPolicy, but it gives me 403 with the error message saying "Identity and Access Management (IAM) API has not been used in project before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/iam.googleapis.com/overview?project= then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry."
I don't want to enable (Identity and Access Management (IAM) API or other such APIs per project) manually from the console every time a project is created.
I want to automate the entire process, so, this is a blocker to do it.
Can someone help, is there a workaround?