How to Read/Send Email via azure free tier account and graph api services

Learning Developer 0 Reputation points
2024-02-05T14:02:38.8466667+00:00

We are creating an app where we can provide email services to user and user can schedule the email sending as well. For this we created a app on Microsoft Azure, Set up the permissions on App and added the users. I am writing JAVA proof of concept for this using msal4j and microsoft graph api. This is what I am doing. I have created free tier account in portal.azure.com and created app.

From Free tier account can I sendEmail or readEmail. I am using below code for it.

IAuthenticationProvider iAuthProvider = new TokenCredentialAuthProvider(clientSecretCredential());
        
GraphServiceClient
Microsoft Security | Microsoft Graph
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. CarlZhao-MSFT 46,376 Reputation points
    2024-02-07T02:38:06.1733333+00:00

    Hi @Learning Developer

    This is because your tenant lacks a valid Office 365 Business subscription. If you are trying to access business-level O365 services (such as Exchange Online, Outlook, Teams, etc.), then an Office 365 license will be required.

    Please follow this document to subscribe to an Office 365 license for your tenant or start a free trial. After that, you also need to grant the license to the target user you are reading/sending emails on behalf of, which will automatically assign an EXO mailbox to the target user.

    de2ca1b1-a817-4825-b13c-dcb988c029f7

    Hope this helps.

    If the reply is helpful, please click Accept Answer and kindly upvote it. If you have additional questions about this answer, please click Comment.

    1 person found this answer helpful.

  2. Sam Cogan 10,812 Reputation points Microsoft Employee Volunteer Moderator
    2024-02-05T14:33:14.4766667+00:00

    This indicates that the Tenant ID you are providing is not valid. Check that what you are providing matches the Tenant ID show on the Entra ID overview page for the tenant where you Entra ID App lives.


  3. Sachin Bansal 0 Reputation points
    2024-09-04T17:01:47.5+00:00

    same thing is happning with me .net

    0 comments No comments

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.