1
votes

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.

1

1 Answers

0
votes

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