Identity platform Tenant Creation programatically python

136 views
Skip to first unread message

mohit kumar

unread,
Dec 16, 2019, 9:01:56 AM12/16/19
to google-cicp-discussion
I am trying to create tenant in identity platform. I have generated the OAuth token and I have given scopes 
as https://www.googleapis.com/auth/cloud-identity.groups but still, I am getting an error as
{ "error": { "code": 403, "message": "Request had insufficient authentication scopes.", "status": "PERMISSION_DENIED" } }

I am able to get the OAuth token. Any hint what mistake I am doing



Md Nazmul Haque

unread,
Dec 16, 2019, 10:35:15 PM12/16/19
to google-cicp-discussion

Managing Identity Platform tenants programmatically first you need a service account to use the provider configuration management API and ensure that multi-tenancy is enabled for your Google Cloud project. Please have a look at the link which might help you. 


Yanna Wu

unread,
Dec 16, 2019, 10:42:07 PM12/16/19
to google-cicp-discussion
Hi Mohit,

You will need to specify https://www.googleapis.com/auth/cloud-platform as the scope. See the REST API doc here.
Message has been deleted

mohit kumar

unread,
Dec 25, 2019, 3:05:17 AM12/25/19
to google-cicp-discussion
Hi Yanna Wu,
Thanks for the answer. The scope that you suggested worked for me. I was providing the wrong scope.

mohit kumar

unread,
Dec 25, 2019, 3:07:25 AM12/25/19
to google-cicp-discussion
Hi Md Nazmul Haque,

I wanted some solution that will work with python. The link that you shared is only for node js. And also it says that tenant creation with SDK is only supported in node js as for now.

Md Nazmul Haque

unread,
Dec 25, 2019, 6:10:03 PM12/25/19
to google-cicp-discussion

Hello Mohit,

It is possible to use the REST API to create tenants but I could not find any python sample code for it.


Reply all
Reply to author
Forward
0 new messages