Fetch Mails From MS-Exchange Using Graph API - powershell

Can someone help me out that how I can fetch mails from Exchange User's mailbox using Microsoft Graph API?
Graph API is working fine for the online exchange users (O365) not for offline users (local users), but there is another problem too. Graph API provides Rest APIs by using which we can access each mailbox individually which will become very server loaded work if more than 1000K mailbox need to be scanned one by one and also a time taking process.
I want to fetch scan all user's mailbox at once both offline and online. Just like Microsoft Powershell do.
Is there any way to do so?
Any help will be deeply appreciated.
Thanks

Related

How can you set Skype for Business status when in a Teams call automatically?

I've hit a wall so I'm asking my favorite community. I created custom Skype for Business activity statuses for Teams so when you are in a Teams call, you can manually set your status in SfB to "In a Teams Call". After searching for many days, i still have not found a way to auto set this status. Is there maybe a plugin for SfB or a service to run for this feature? This is for SfB (On-Prem). I primarily script in PowerShell but any guidance would be very appreciated.
#John, Microsoft Teams replaces Skype for Business Online as Microsoft’s professional online meeting solution. For more information on this please check this document.
To get/set up user status, you can use Presence Graph API's. For more information on Presence Graph API, please check this API docs
I created a windows service to check my Teams presence using the Graph API. If it returns InACall, I use Skype for Business Modules to set my activity to In-A-Call.
Sample code:
https://schmalhorstorg.blogspot.com/2020/04/powershell-set-skype-for-business.html

Microsoft Teams : REST APIs

I'm interested in getting data (metadata and content of files) out of Microsoft Teams into my application using REST APIs. I have looked at Office 365 APIs and Graph APIs but, I could not find supporting documentation for Microsoft Teams.
Teams API is now added to beta endpoint in Microsoft Graph. In documentation, you can find it together with Groups. Post, Channel and Chat Thread are available.
For example, documentation for "channel" resource is here:
https://developer.microsoft.com/en-us/graph/docs/api-reference/beta/resources/channel
Microsoft Teams REST API is now included into MS Graph API
https://learn.microsoft.com/en-us/graph/api/resources/team?view=graph-rest-1.0
At the time of writing this answer there are not too many APIs around Teams. However more are being added and they are in Beta (sending messages, adding apps to team, uploading team image, and more).
https://learn.microsoft.com/en-us/graph/api/resources/team?view=graph-rest-beta
It is not recommended to use Beta APIs in production environment as they might change.
It is also worth of mentioning that Teams are actually Office365 Groups.
Please take a look at Graph API
https://learn.microsoft.com/en-us/graph/api/resources/team?view=graph-rest-1.0
https://learn.microsoft.com/en-us/graph/api/resources/team?view=graph-rest-beta
Expand "Teamwork" at left side, you can get all Teams related API
We do not have Teams APIs available at this time. Our extensibility options are limited to experiences within the Teams application.
The Microsoft Graph API is constantly changing and we're currently using the following to monitor/interact with our Microsoft Teams application:
https://learn.microsoft.com/en-us/graph/api/resources/teams-api-overview
It gives access to the following (at the time of writing this):
We also monitor the general usage via the reports section in the Graph API:
This gives access to:
Device Usage:
Get details about Microsoft Teams device usage by user.
Get the number of daily unique users by device type.
Get the number of unique users by device type over the selected time period.
User Usage:
Get details about Microsoft Teams user activity by user.
Get the number of Microsoft Teams activities by activity type. The activities are performed by Microsoft Teams licensed users.
Get the number of users by activity type. The activity types are number of teams chat messages, private chat messages, calls, or meetings.
https://learn.microsoft.com/en-us/graph/api/resources/microsoft-teams-device-usage-reports?view=graph-rest-1.0

Transition from yahoo groups to google groups

A yahoo group I'm in is preparing for the possibility of yahoo's demise.
They are investigating the transition to google groups.
We do not want to give up either backlog or attribution of the 13,000 some posts.
Is there a way to transfer information, including users of individual posts from yahoo groups to google groups.
Alternately, is it possible from Yahoo groups to something like phpBB.
I am posting this in both Stack Exchange and in Google products forum.
While the question is an old one, others may be interested to know that using the Google Groups Migration API it is possible to upload the users and the data from Yahoo Groups.
Sequence:
Download your Yahoo Group data using Personal Groupware http://www.personalgroupware.com
Export the the data into your chosen database (e.g. MySql)
Upload the data using the Google Groups Migration API
https://developers.google.com/admin-sdk/groups-migration/v1/get-start/getting-started
You will not be able to transfer your group to Google.
The upload of group data follows this pattern:
Upload Users
Upload Subjects
Upload Replies
You will be stuck at 1) as you are unable to create the list of users on Google. You do not have write access to the Google user database.
For phpbb this will definitely be possible as you have full control of the database.

How do I query the Exchange Online REST API for a list of users, mailboxes and/or calendars?

Background
I'm able to query outlook.office365.com/api/v1.0/me/ for the current user that is logged in. But I'm unable to find a query that would give me a list of users. Below are the following queries I've tried without any luck.
outlook.office365.com/api/v1.0/users/
outlook.office365.com/api/v1.0/me/users/
This is the error I receive when I'm doing either of the queries.
https://www.dropbox.com/s/64o0mwj1w3uigk8/Screenshot%202015-07-09%2013.07.22.png?dl=0
Goal
I would like help finding the correct REST API queries for a list of users, mailboxes, and calendars.
Extra Findings
Note that while I was referring to https://msdn.microsoft.com/en-us/office/office365/api/complex-types-for-mail-contacts-calendar#RESTAPIResourcesUser I received the error listed above for the query'../me/users/$count' when trying to count the number of users.
We don't allow enumerating the list of users in a tenant using the outlook endpoint. you can however do this using the AAD graph api. For example:
https://graph.windows.net/contoso.com/users?api-version=2013-04-05
For calendars, you can see all calendars of a given user by enumerating those from ../me/calendars
Thanks for mentioning the $count issue, it was a bug which has been fixed. You should see it rolled out soon worldwide. But note that this will still not allow you to get a count of users as that collection is not enumerable. The $count will help with queries like ../me/messages/$count

How to manage office 365 accounts in windows azure web site

I'd like to deploy a Office 365/Exchange Online management portal in the WAWS(Windows Azure WebSite) which could create new user/group/mailbox or change some property of specific user, etc. Is it possible to deploy this kind of web application in the WAWS environment? Should I call PowerShell and Office365 cmdlet in the ASP.NET environment? Or there are any better way to do this?
As the #Matt alludes to in his comment, there is already a web-based management portal for both of these. However, since you ask this question, I'm going to assume that you want additional functionality/customization.
The short answer is yes, you can.
User accounts in Office 365 are, behind the scenes, accounts in Azure Active Directory. So, for creating users, contacts, security groups and adding licenses, you will need to use the Azure Active Directory Graph API:
Getting Started With Windows Azure Active Directory Graph
For managing Exchange Online, you will probably want to use the Exchange Web Services Managed API 2.0. You'll probably only need this if you need to create distribution groups or manage individual users' contact folders (mailboxes for users get created when you assign an Exchange license from Azure Active Directory).
Get started with EWS Managed API client applications
Update: the Office 365 APIs were recently announced, and are now in Preview. They are a RESTful API, which can be used to manage (for now), mail, contacts and calendar items. Depending on your use case, this may be easier to deal with than the EWS Managed API 2.0.
Using the Mail, Calendar, and Contact REST APIs to work with emails, calendar items, and contacts