How to create google workspace by API - google-api

I'm trying to create a google workspace with her API but I don't find any information about it.
I understand that I can manage my workspace with the admin sdk, but how to create a new workspace for a new domain
I can buy a domain by API but not subscribe to a workspace ?
The goal is to create custom email when buying a domain name programmaticaly
Thank you

It's not possible but the goal behind was to handle different "group" that you can handle with Organisation.
Create different Google Workspace wasn't the real need.
Thx

Related

Reading/Writing M365 Admin contacts

An administrator for a Microsoft 365 domain can create external contacts that are visible to users within that domain. Those contacts can be seen in the M365 Outlook client under "Directory->All Contacts" or "Directory->Default Global Address list".
I need to use EWS to read and create these contacts. As a first step I'm just trying to read them, using FindFolder, against MsgFolderRoot of a user. Unfortunately the only contact folders that show up are the ones defined for the user in question, not the external contacts created by the Admin. There are several contact folder classes that seem promising, such as "OrganizationalContacts" and "ExternalContacts" but there are no entries in those folders.
I could also use Graph for this if the capability is there. Any help on this problem would be appreciated.
Directory contacts exist in the Directory eg Azure AD or the local AD onPrem neither EWS or Graph can create these type of contacts then only thing automatable that can do that is https://learn.microsoft.com/en-us/powershell/module/exchange/new-mailcontact?view=exchange-ps
For reading Directory contacts the Graph is a better option it has a supportable endpoint via https://learn.microsoft.com/en-us/graph/api/resources/orgcontact?view=graph-rest-1.0. EWS can do this via FindPeople but it's not documented and requires that you know the addressbook guid which isn't available via EWS.

Google Drive Share access to other email address for oAuth 2 using API

Is it possible to share google drive access of other email address using oAuth2 and javascript client API?
If I have both of other's emailaddress and password?
If using Service account?
I just want to create an app that will allow other Google Signed In users to see and manage my files and directories.
Let me know what is your idea, best practices, steps on this. Thanks
Ok so we are clearn here person one is the person who would like to share something on their drive with person two.
Your application uses oauth2 to authenticate person one. Then you use the Permissions method to insert permissions for Person two into what ever file or folder you wish to share with them. Its person one who has to do this.
Notes:
Service accounts dont work with JavaScript client side you would need to use a server sided language. Service accounts are a dummy user you would be granting the service account access and not person two.
You cant share the whole drive you cant share the root folder. You could write a script that shares everything under root. But someone else cant write to your root folder.

Google Cloud API - Get Projects from User

I know that using the Google Cloud User Accounts API (https://developers.google.com/apis-explorer/#p/clouduseraccounts/beta/) it should be possible to enter a Project ID and obtain a list of user accounts associated with this.
Is there a GCP/Google API which does the opposite however and you can supply it with user (ID, email etc.) and it will list projects associated with this user?
I am not too familiar with GCP APIs so trial and error so far...
Thanks
The cloudresourcemanager.projects.list should be the API you're looking for: https://cloud.google.com/resource-manager/reference/rest/v1beta1/projects/list
API Explorer: https://developers.google.com/apis-explorer/#search/Resource/cloudresourcemanager/v1/cloudresourcemanager.projects.list

Google apps marketplace App only for specific domain

I want to create an app only applicable for one or two domains. And i am trying to follow the doc here, https://developers.google.com/apps-marketplace/listing
I have done all the steps except 7th step, as i don't want it to be published on marketplace.
Also i have got an url after publishing the app in webstore, but when i click on the link it only allow me to add as a chrome extension, but nothing as an market place app?
So now, how can i add it to my domain and any other specific domain i want?
Please let me know if you need more information.
Thanks,
Ramesh.V
You will actually want to publish but make sure you configure the visibility options correctly. In the Developer Dashboard you can make a listing available to your domain, a Google Group of testers, etc. In order to restrict to a domain, the admin creating the listing must be a member of the domain. So in order to restrict to more than one domain, I would recommend creating a unique listing per domain. Many system integrators take advantage of this by creating unique branding per domain. Alternatively you could use the Google Group route if that's all you need.

Unable to recover Google API project and "This client ID is globally unique and is already in use."

I've been working as a consultant on an Android project that uses Google oAuth2 to authenticate and identify it's users. The Android project is in production and available for download on Google Play. The oAuth client ids and the entire Google API project was setup by me using a Google Apps e-mail address setup in my name on the client's domain.
Since the project has been released and my work with the client is finished my e-mail address has been deactivated and subsequently deleted (or so it seems, the client claims to not being able to recreate it). Since my e-mail account was set as the owner of the API project the deletion of my e-mail address has resulted in the deactivation (or deletion) of the API project as well. This has of course seriously crippled the app in question.
To get things up and running again a new e-mail address was set up for me on the client's domain and I created a new API project. The problem is that I'm unable to create the oAuth client ids since the packagename and SHA1 key are the same as for the app already live. I get the "This client ID is globally unique and is already in use" message and I seem to be stuck in a very awkward situation. I see a couple of possible solutions but I'm not sure how to proceed:
Reactivate the original e-mail address in the hope that the API project is still linked to that account
Reactivate the Google API project with the help of a Google engineer and assign it to an e-mail account on the client's domain
Delete the client ids from some Google database with the help of a Google engineer and setup a new API project and release a new version of the app.
Worst case: accept the loss, change package name, release a new app and kindly ask users to migrate to the new app.
I've read that Google monitors the google-oauth tag here on SO and I hope to get some help either from the SO community or Google itself. Many thanks in advance!
In the future, please coordinate for long-term ownership of the project, since the Google accounts that own the project are an important aspect of Google's authorization system. For instance, the owner of the project signs ToS for accessing the APIs on behalf of users.
I will follow up with you to find a way to sort out this issue.

Resources