google-admin-sdk

Unable to delegate users using Email Settings API

只愿长相守 提交于 2020-01-07 03:05:41
问题 Does anyone know if the Admin SDK / Email Settings API has changed recently? Previously we were able to delegate a user account for a user that was disabled, this is no longer that case. Following is the stacktrace: 400 Bad Request { "error" : "invalid_grant" }. Stacktrace follows: com.google.api.client.auth.oauth2.TokenResponseException: 400 Bad Request { "error" : "invalid_grant" } at com.google.api.client.auth.oauth2.TokenResponseException.from(TokenResponseException.java:105) at com

Unable to delegate users using Email Settings API

自闭症网瘾萝莉.ら 提交于 2020-01-07 03:05:32
问题 Does anyone know if the Admin SDK / Email Settings API has changed recently? Previously we were able to delegate a user account for a user that was disabled, this is no longer that case. Following is the stacktrace: 400 Bad Request { "error" : "invalid_grant" }. Stacktrace follows: com.google.api.client.auth.oauth2.TokenResponseException: 400 Bad Request { "error" : "invalid_grant" } at com.google.api.client.auth.oauth2.TokenResponseException.from(TokenResponseException.java:105) at com

Trying to Creating users in Google Apps domain in Windows Forms code

北城以北 提交于 2020-01-06 15:21:35
问题 I'm trying to create a user from a windows forms application. I've managed to do it in a consoleapp, but I want it in a proper windows app. :) To get the authentication right' I've tried to figure out how the AssertionFlowClient is working, but it won't come out right. Here's the critical code: private void CreateUserBtn_Click(object sender, EventArgs e) { var provider = new AssertionFlowClient(GoogleAuthenticationServer.Description, new X509Certificate2(@"C:\key.p12", "notasecret",

Google Email Settings api using OAuth 2.0 service account in java

半城伤御伤魂 提交于 2020-01-06 14:55:17
问题 I want to use Google Email Settings api using OAuth2.0 service account authentication method in Java, however I am unable to find any useful client classes from Google or sample examples about how to do this. I have had a look at Directory apis which are very useful for user or group related operations. Is there any equivalent for Email Settings api? 回答1: You can still use the old library AppsForYourDomainClient.jar with Service Accounts. You need to override the method were the user/password

Update user using google admin directory api returns 200 but does not update. Malformed request body?

风流意气都作罢 提交于 2020-01-06 07:58:35
问题 I have a user in my google admin console with the email dog@jopfre.com. I can auth successfully and add and delete users using the api. Now I am trying to update the user using the api. Here is a simplified version of my code: const admin = google.admin({version: 'directory_v1', auth}); admin.users.update({ userKey: "dog@jopfre.com", requestBody: { primaryEmail: "cat@jopfre.com" } },(err, data) => { console.log(err || data); }); This returns json of the request and a 200 status. The nearest

firebase.auth().currentUser is null

|▌冷眼眸甩不掉的悲伤 提交于 2020-01-03 09:45:34
问题 I'm trying to retrieve the UID of the current logged-in firebase user in my Angular 4 app. Though, if I'm logging 'firebase.auth().currentUser' to the console I get a 'null'. So 'firebase.auth().currentUser.uid' gives an 'Cannot read property 'uid' of null' error. According to this article https://firebase.google.com/docs/auth/web/manage-users that would mean that I'm currently not logged in. Though, I am, since I can read data from my database (my rules do not allow unauthenticated users),

Retrieving Google User Photo

守給你的承諾、 提交于 2020-01-02 05:19:26
问题 I am able to retrieve the thumbnailPhotoUrl from the user.list api of the google admin SDK. However, whenever I try to render the image, Google is redirecting to a static silhouette image. The URL that is retrieved via the API looks like https://plus.google.com/_/focus/photos/private/AIbEiAIA.... As mentioned, this ends up getting redirected to: https://ssl.gstatic.com/s2/profiles/images/silhouette200.png However, with a little bit of reverse engineering, I can see the photo by adding /u/1/

Accessing G Suite Admin SDK using service account

允我心安 提交于 2019-12-30 10:54:47
问题 I am trying to use a service account to access Directory API (https://developers.google.com/admin-sdk/directory/v1/reference/users/list). The simplest task is to list users in the organization. That works well with my user account, tested with the OAuth 2.0 Playgorund. But I need to use service account. I am following documentation for two-legged OAuth (https://developers.google.com/identity/protocols/OAuth2ServiceAccount) and implementing REST client in Powershell API Access enabled in

Google reports Email Log Search API

僤鯓⒐⒋嵵緔 提交于 2019-12-25 16:44:05
问题 In the admin panel, one can go to Reports and run an Email Log Search. I wasn't able to find an API (hopefully RESTful) for this. Can anyone point me in the right direction? I know there is Email Audit Logs but that's not quite what I'm looking for. An audit process requires a specific mailbox to be audited whereas I'm looking for an organization-level search. Thanks. 回答1: Not an API, but you can install an application for GSuite domains that lets you search the whole domain mailboxes. 来源:

How to apply filters to exclude some users while retrieving users from Google Apps

独自空忆成欢 提交于 2019-12-25 07:58:10
问题 I can apply the filter to get the specific users while retrieving all the users based on givenName, familyName and email attributes. But the requirement is to apply the filter such that it excludes some users while retrieving all the users e.g i don't want users which has givenName=admin*. I know that we can do post processing locally once all the users has been returned by Google API but it may have performance impact to exclude the unwanted users locally. Is there any way to pass the filter