In what scenario that we need multiple service accounts or multiple keys under one service accounts?
I mean, is there any constraints or considerations from the bigquery side?
Bigquery does not restrict the number of service account credentials you can use. I don't know what the limit is for the number of service accounts you are allowed to create in a Google Apis Console project, but if you can create service account credentials, you can use them with Bigquery.
You do need to give your service accounts access to your datasets and the project itself in order to run queries. The easiest way to do this is to add your service account to your project's Permissions page. How project "roles" map to Bigquery access is described here: https://cloud.google.com/bigquery/access-control#projectroles
Related
I'm not getting the "descriptor" in Profile API response. This I need to save in database to identify whether he/she is a returning user on our web portal or a new user.
Did some research on Azure devops REST APIs to find that, there is something called "descriptor" which is a unique id for any user on Azure devops platform.
For that, I tried Profile REST API endpoint - https://app.vssps.visualstudio.com/_apis/profile/profiles/me?api-version=7.0
I need this descriptor or unique id because to identify whether a user is returning user or new user based on which I can create account or simply sign in. In other words, I'm implementing Oauth flow to Signup with Azure devops.
However, I get some "id" in Profile API response but that is not unique across different Azure devops accounts or organizations.
Any ideas on how to get "descriptor"? can we get in Profile API? or any other API?
Thanks in advance
Any ideas on how to get "descriptor"?
We cannot get the "descriptor" using the Profiles API.
To get the "descriptor" we can use Users - List - REST API (Azure DevOps Graph)
Alternately, we can use the following REST API for the currently logged in user:
https://dev.azure.com/{organization}/_apis/connectiondata
I'm trying to pull our Google Classroom data into a custom web application via the Google API Client (PHP). I was able to make a successful call using a service account set up in Google Cloud, but the call returned no Classroom data.
I'm assuming the Classroom data must be associated with a different Google Cloud Project, I'm just not sure which one. I don't want to create a service account for every single project and test them, there are too many projects. I've looked everywhere and I can't seem to find the answer to the question: how do I find out WHICH project a Google Classroom integration is associated with, so I can configure the API Client accordingly?
I tried looking through all Classroom settings to see whether there was any information about the Google Cloud Project being used to store the data. I tried contacting Google Support, but so far I've had problems getting an answer to my question.
Ultimately I just want to pull the Classroom data into our web application.
Thanks
To use a service account with google classroom api you must configure Domain wide deligation. This will allow the service account to impersonate a user on your domain.
$user_to_impersonate = "admin#yourdomain.com";
$client->setSubject($user_to_impersonate);
The service account will then behalf as though they were that person. It can then see everything that user has access to.
Without delegation in place the service account doesn't have access to anything.
I've been able to create a Google service account that can access Big Query within my application, but I'm trying to limit that service account to only be able to read from a very specific dataset (among may possible datasets in the application).
I thought that this question might give me guidance, but the solution unfortunately didn't end up providing specifics:
How to create a Google BigQuery service account with access to a single dataset?
Does anyone know if it's possible to restrict a specific service account to a single dataset?
It's possible to restrict access to only certain datasets for service account. Instead of adding the email address of the service account at the IAM level in the GCP console, instead "share" the dataset in question and add the email address there. Then the service account will only have access to that dataset(s).
I want to build a dashboard to my clients access your respective website analytics. But, after some research, I'm stuck.
Let's imagine the scenario:
My Analytics Account:
Client X - websitex.com
Client Y - websitey.com
In my dashboard, when the cliente Y log in, the data (pageviews) of websitey.com is shown on graphics.
But, there's a way to do that? By the moment, the only thing i got is retrieve information for my logged account (my analytics ID), not the information about another account.
There's a way to use the Google API, or, I'll have a "separate database" to save data each website?
Sorry, I'm really lost at the moment.
You can only view Google Analytics Accounts that you are authorized to view. For some reason this is a source of major confusion (seeing that your are not the first to ask), although it should be fairly self-evident.
If you want to see data from your clients account you have to ask your client to add your Google email to the GA account. If an email address is added to multiple accounts you can, via the API, choose between the accounts. Clientside authorization (OAuth2) will only work as long as somebody is logged in via a client application (usually a browser). The practial effect is that everybody who is authenticated via OAuth against Google will see only his own GA accounts, not other peoples data.
If you want a serverside application to pull data from various GA accounts you need a service account. But even the service account needs to be added to the GA accounts.
You can use the core reporting API, but the API will not give you access to accounts that you are not authorized to look at; your client needs to authorize you (or your applications service account).
We built a system where we can access all our clients google analytics. I use Google service accounts to do server calls to google Analytics API and grant access to that service account as a user. Some how there is a limitation where each service account reaches a limit to be added in user accounts. (we have more than 2000 clients).
As of now, I am creating multiple service accounts when ever the previous reaches its limit. What is the solution for this?
Thank You,
The Core Reporting API has a quota limit of of 10,000 requests per view (profile) per day.
I suspect what you are doing is trying to display your Google Analytics data to all of your customers. Which isnt really going to work because of the quoat limit. I recomend that you use your service account to download your data into your own system and then display the stored data to your users.
There is no way to increase this quota limit.