question

PavanKushwaha-0345 avatar image
0 Votes"
PavanKushwaha-0345 asked EricYin-MSFT commented

GRAPH API TO ACCESS INBOX OF ALL USERS AT ONCE MS-EXCHANGE SERVER

I have MS-Exchange server deployed on my server where there are different types of users (locally or hybrid). The users can be seen on admin.microsoft.com (outlook admin panel) but when I try to access the mailbox of users which are locally saved, an error I am getting in response of the GRAPH API -

{
"error": {
"code": "MailboxNotEnabledForRESTAPI",
"message": "REST API is not yet supported for this mailbox."
}
}

And also, Is there any way that I can search mails in all user's mailbox at once. I found something regarding this "Message Trace", available in outlook admin panel (API -https://reports.office365.com/ecp/reportingwebservice/reporting.svc/MessageTrace) which do the work for me but it requires Basic Auth implementation which I don't want to do. I want to authorize the API request using Oauth access token. Is there any way?


Any help will be really appreciated.

Thanks In Advance

office-exchange-server-administrationoffice-exchange-server-mailflowoffice-exchange-server-connectivitymicrosoft-graph-mailoffice-exchange-server-deployment
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

PavanKushwaha-0345 avatar image
0 Votes"
PavanKushwaha-0345 answered EricYin-MSFT commented

Hi,

Thanks for the reply. It's really helpful.

And also, I tried to reach Microsoft support but did't got reply from the team. Is there any another way that I can connect to the the support team.

Thanks & Regards

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi,
You can have a ticket here: support.microsoft.com/oas

0 Votes 0 ·
PavanKushwaha-0345 avatar image
0 Votes"
PavanKushwaha-0345 answered EricYin-MSFT commented

Hi,

The mailbox is on-premises.

The link which you have shared is great but I don't want to dive into powershell and searching for REST APIs which I can use to get my work done. Is there any?

I have also mentioned about message-trace in my question. Can you please describe me a little on that too.

Thanks

· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi,
You cannot use the API if your mailbox is not on Exchange Online.
Message trace is for tracking mail flow, I don't think it's helpful in your situation, for example, a user receives the message without issue and then he delete it, in message tracking log it shows message delivered successfully but you can't find it in Inbox.
If you don't want to use powershell, try Creating an In-Place eDiscovery search EAC: https://docs.microsoft.com/en-us/exchange/policy-and-compliance/ediscovery/create-searches?view=exchserver-2019#use-the-eac-to-create-a-search

0 Votes 0 ·

I am writing here to confirm with you how the thing going now?
If you need further help, please provide more detailed information, so that we can give more appropriate suggestions.


If an Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


0 Votes 0 ·
EricYin-MSFT avatar image
0 Votes"
EricYin-MSFT answered

Hi,
You cannot use the API if your mailbox is not on Exchange Online. Can you confirm if the mailbox is on-premises or on Exchange Online?
If you want to search something in a user's mailbox, you can use mailbox search:
New-ComplianceSearch: how to use the newer version of Search-Mailbox
Please Note: Since the web site is not hosted by Microsoft, the link may change without notice. Microsoft does not guarantee the accuracy of this information.


If an Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.