How to enable Office 365 Exchange Online API permissions

Pierre Tavolo 5 Reputation points
2024-08-01T22:16:15.1866667+00:00

Hello!

I need to read emails from my personal Outlook account with a Python service via IMAP. Since it is a service, I need to access the emails without user authentication via an UI. In the docs I found, I should register an app in Azure with IMAP access or ReadEmail permissions in the Office 365 Exchange Online API. However, this API does not appear for me in the Microsoft APIs screen, nor in the APIs screen that my organization uses. How do I activate this Office 365 Exchange Online API in Application Permissions? Do I need a specific license? Or is there an easier way to read emails from a personal account, using Application Permissions, now that Microsoft has deprecated basic authentication?

Thanks!

Microsoft Exchange Online
{count} vote

1 answer

Sort by: Most helpful
  1. Xintao Qiao-MSFT 5,085 Reputation points Microsoft Vendor
    2024-08-02T02:48:45.09+00:00

    Hi, @Pierre Tavolo

    Welcome to the Microsoft Q&A platform!

    By your description, it is right to register your app in Azure, you can try the following again.

    1.Register an App in Azure:

        Go to the Azure portal and navigate to "Azure Active Directory" > "App registrations" > "New registration".

        Fill in the required details and register the app.

    2.Assign API Permissions:

        On the app's Overview page, select "API permissions" from the "Manage" section.

        Click on "Add a permission" and select "APIs my organization uses".

        Start typing "Office 365 Exchange Online" in the search box and select it from the results.

        Choose "Application permissions" and expand the "Exchange" section.

        Select the necessary permissions such as Exchange.ManageAsApp and Exchange.Manage.

    3.Grant Admin Consent:

        After adding the permissions, you need to grant admin consent for the permissions to take effect. This can be done by clicking on the "Grant admin consent" button on the API permissions page.

    User's image

    More information can be found Get started with Office 365 Management APIs | Microsoft Learn

    If you are still unable to find the permissions, you can try using the Microsoft Graph API as an alternative. The Microsoft Graph API provides a unified endpoint for accessing various Microsoft services, including Outlook.

    If the answer is helpful please click on ACCEPT ANSWER as it could help other members of the Microsoft Q&A community who have similar questions and are looking for solutions. Thank you for your support and understanding.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.