Remove User From Yammer Group - yammer

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.

Related

Microsoft Graph Get Calendars of All Users

I'm trying to use the Microsoft Graph API to get the calendars of all the users in an organization. Is there a way for an admin with the appropriate permissions can get all user calendars with one request to the API? I'm aware that it is possible by first retrieving a list of all the users then using the user IDs to send a request for each's calendars. I'd like to avoid this approach so that I can avoid making too many calls to the API. I'd also like to be able to do this without every using having to share their calendars with the admin. Does support for something like this exist? Thanks.
No, it is not possible to get all Calendars of all users in one request.
You can do it only over the way you described.
There are two part to your question:
1: Get all calendars of all users in call: This is not possible.
2: Get access to calendars with users explicitly sharing the calendars. This is possible using app-only access tokens.
https://developer.microsoft.com/en-us/graph/docs/concepts/auth_v2_service

Yammer API - How to make user group admin

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.

How can I reliably link to a Gmail conversation given a thread ID if the user is logged into multiple accounts?

If you're logged into multiple Gmail accounts, Google changes the URLs to reference which account you're currently using. For example:
https://mail.google.com/mail/u/0/#inbox/138d85da096d2126 for a convo in my primary account vs
https://mail.google.com/mail/u/1/#inbox/128cfe99d055805d for a convo in another one of my accounts.
Note that one account has /u/0 in the URL and the other has u/1.
My question is: given that I've used the Gmail REST API to find the ID of a particular thread, how can I reliably link to that thread? Is there any programmatic way to ask Google which accounts the user is logged into, and what sequence (0, 1, 2, ...) each account falls under?
Looks like you can include a query parameter called authUser that specifies the email account you want to link to:
https://mail.google.com/mail/?authuser=your.email.address#gmail.com#all/138d85da096d2126

Yammer REST endpoint to get user by full name

I'm working on a migration Product that migrates data in to yammer. I want to match the user on source to user on target based on full name. How do I retrieve user from Yammer based on Full Name? There is one REST endpoint to get user by email. Is there something similar to this for user Full Name ?
It's not possible to do this with the User API as it only supports getting a user by ID or email. You might want to look at the Autocomplete API, but it might be quicker to use the Data Export API and find the user in the users.csv file. It's hard to provide recommendations when you don't explain what you app does.

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