Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/jandev/mailboxreader

Sample project which is able to read the mailbox of a user using Azure Active Directory and Office 365 using Microsoft Graph API
https://github.com/jandev/mailboxreader

Last synced: 17 days ago
JSON representation

Sample project which is able to read the mailbox of a user using Azure Active Directory and Office 365 using Microsoft Graph API

Awesome Lists containing this project

README

        

# MailboxReader
Sample project which is able to read the mailbox of a user using Azure Active Directory and Office 365 using Microsoft Graph API

With this tool you're able to list the e-mails of a configured mailbox. Of course, it's necessary to have the appropriate permissions from Azure Active Directory & in Office 365.

## Run the project

In order to run the project you need the following settings
```json
{
"AppRegistration:ApplicationId": "",
"AppRegistration:ApplicationSecret": "",
"AppRegistration:TenantId": "",
"AppRegistration:RedirectUri": "",
"AppRegistration:Domain": "",
"Query:UserEmailAddress": "",
"Query:UserIdentifier": "",
"Query:FindUser": " -PolicyScopeGroupId -AccessRight RestrictAccess -Description ""
```
3. Test the access policy
```powershell
Test-ApplicationAccessPolicy -Identity -AppId
```
Do note, the synchronisation of the access restriction can take a long time. The docs state 30 minutes, but I noticed it can take longer.

# Credits
Got a lot of inspiration & implementation from [the Microsoft Graph .NET Core samples](https://github.com/microsoftgraph/dotnetcore-console-sample)