Yammer API - How to make user group admin - yammer

Please let me know, if any Inputs on how to make a Yammer Group Admin, or add user as group admin.
Thanks.

There is an api endpoint which is not in the documentation bu being used by the Yammer App itself.
User must be in the group before, it will not add the user itself.
Make Admin:
https://www.yammer.com/api/v1/groups/{groupId}/make_admin?user_id={userId}
Revoke Admin:
https://www.yammer.com/api/v1/groups/{groupId}/revoke_admin?user_id={userId}
Hope this is still helpfull, since the posting date is really old.

Related

API - Customer ID is not easy to find - please support my_customer

The new Cloud Identity Groups API is great - now our customers can pick from their groups without needing admin roles.
However they need to know the customer ID, which afaik can only be found in the control panel.
The Admin SDK allows us to use "...the alias my_customer to represent your account's customerId..."
https://developers.google.com/admin-sdk/directory/v1/reference/users
Please can we have the same for the new API?
You can find the customer ID using the organizations.list API without needing admin roles. It's the directoryCustomerId field.

Changing status of other users on a free plan Slack

It always updates my user profile instead of the user that I specify in X-Slack-User:
https://slack.com/api/users.profile.set?token=yadayadayada&X-Slack-User=XYZ23456&Content-type=application/json&charset=utf-8&profile={"status_text": "Test #1","status_emoji": ":gb:","status_expiration": "5"}
The user Ids that I tried to specify are valid ones, I'm an admin and I created an app with the required rights, the legacy token did no good as well, this works, but just for my user, X-Slack-User is not working in my case.
I'm on a free plan so passing "user" as a param doesn't work for me, as states the API: "ID of user to change. This argument may only be specified by team admins on paid teams."
Is there maybe another way to update the status of other users on a free plan Slack?
As you already stated the API method users.profile.set can only be used to change the profile of other users if you are an admin and on a paid team. A property X-Slack-User is not part of the API, so it will not work either.
There is a workaround for teams on a free plan tough:
The API method will always work to change the profile for the owner of a token. You could collect tokens from all you users and then use those to change the status for each user. For that each user will have to install your app though OAuth once. This will create individual tokens for each user, which your app needs to store. This is called "configurations".

Login With Google Access Control Using GSuite Groups

We are trying to implement a "Login With Google" feature for an internal admin dashboard web app connected to our GSuite account. We want to limit login to this dashboard in two ways.
Only members of our GSuite domain can login to the dashboard
Only users in our domain belonging to a specific group within our domain can login to the dashboard
So far we have been able to accomplish number 1 above but not 2. Using a query param to the oauth2 API we can limit the domain. What we have in mind to accomplish number 2 is after the user within our domain is logged in, get their group information and validate that they are in the proper internal group or log them out. The issue with this is it seems only GSuite admin accounts are allowed to make API calls to the Directory API for this information. Is there no way to get the group information for a user with their own access token or using a service account? Ideally we don't want to have to provide a specific admin user within our GSuite account's personal credentials in our application to get this working. Is there a better way to proceed?
Thank you in advance for any help!

Remove User From Yammer Group

Is it possible to programmatically remove a user(s) from a yammer group via the API? Think of employee off boarding or department change scenarios and the system needs to remove the user from one group and add them to another.
Yes it is. Obtain the user's access_token using the impersonation endpoint, then send a DELETE request to: https://api.yammer.com/api/v1/group_memberships.json?group_id=
See this blog post for further details.

add calendar to another user's calendar list

Not sure if this is possible or if anyone has managed to do this. I have user with super admin access, with which I can create a new user for my domain. However I also want to add a couple of calenders to the created user's calendar list. When I create a user I authenticate using my super admin, but then I can't add a calendar to the user's calendar list since I am not logged in as the user. Is it possible to do this as the super admin, or do I have to logout and authenticate as the created user in order to add calendars to their list? This is the base url to which the post request is made:
https://www.googleapis.com/calendar/v3/users/me/calendarList
in the place of me could I pass in the id of the user? I couldn't find any parameter in the documentation with which I can specify the user to whose list I want to add a calender.
Thanks
Two options:
Each user much login to google calendar and share thier calendar to a single user. You can then use this account to update their calendars. Note that google has limitations to how many calendars and request you are allowed before the account goes to read-only mode.
Buy a google apps domain (5$per user per month) and create a service account at console.developers.google.com. Create a project and give it domain wide delgation at admin.google.com. In Apps engine you should be able to give access for admin to modify all users calendars.
No matter what case you choose, you also need to enable CalendarAPI at dev console site. Now with private key created from website request OAuth2 access token, where sub field is set for the users that you want to change calendar for. With returned access token use CalendarAPI to modify calendar.
Sry for bad english and short description, i'm in a hurry. /conner ;)

Resources