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.
How to Read/Send Email via azure free tier account and graph api services
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
2 answers
Sort by: Most helpful
-
-
CarlZhao-MSFT 40,226 Reputation points
2024-02-07T02:38:06.1733333+00:00 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.
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.