Navigate to the Azure AD Portal. Walk through these steps to create an app, assign it permissions, and grant admin consent.
- Create a new Azure AD application.
- Assign the delegated permission for Read user mail.
- Assign the delegated permission for Read user calendars.
- Assign the application permission for Read directory data.
- Grant admin consent to the application.