Unable to fetch outlook emails

Haziq Majeed 0 Reputation points
2024-09-10T10:47:28.27+00:00

When I try to fetch the emails from outlook, I got following error.

Error details: {"error":{"code":"OrganizationFromTenantGuidNotFound","message":"The tenant for tenant guid '{Tenent_ID}' does not exist.","innerError":{"oAuthEventOperationId":"c47abc57-3eda-4099-aec2-b045b1e4f2a3","oAuthEventcV":"EVekkgTBOdsRhDIDdDgxAw.1","errorUrl":"https://aka.ms/autherrors#error-InvalidTenant","requestId":"fde4c991-01f8-4424-b015-057e106d230f","date":"2024-09-10T10:45:08"}}}

Even I added the permission on my application as well.

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
12,113 questions
Azure Advisor
Azure Advisor
An Azure personalized recommendation engine that helps users follow best practices to optimize Azure deployments.
63 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Hitesh Pachipulusu - MSFT 2,225 Reputation points Microsoft Vendor
    2024-09-11T07:10:23.9533333+00:00

    Hello Haziq Majeed,

    Thank you for reaching Microsoft Support!

    It looks like you’re encountering the “OrganizationFromTenantGuidNotFound” error, which typically means that the tenant ID you’re using does not exist or is not recognized by the Microsoft Graph API. Here are a few steps you can take to troubleshoot and resolve this issue:

    Verify Tenant ID: Double-check that the tenant ID you are using is correct. You can find your tenant ID in the Azure portal under Azure Active Directory > Properties.

    1. Check Subscription: Ensure that your Azure AD tenant has an active Microsoft 365 subscription. This error can occur if the tenant does not have the necessary subscription.
    2. Endpoint Usage: If you are using a personal Microsoft account, make sure you are using the /common endpoint instead of the {tenant_id} endpoint. The {tenant_id} endpoint is meant for organizational accounts. Please check the Q&A.
    3. Permissions: Confirm that your application has the necessary permissions to access the resources you are trying to fetch. You can check and update permissions in the Azure portal under Azure Active Directory > App registrations > [Your App] > API permissions.
    4. Tenant Configuration: Ensure that your tenant is properly configured and that there are no issues with the tenant itself. Sometimes, reconfiguring the tenant or setting up a new one can resolve such issues.

    Hope this helps.

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


  2. Yakun Huang-MSFT 5,415 Reputation points Microsoft Vendor
    2024-09-11T09:00:02.94+00:00

    Hi @Haziq Majeed

    This error is usually due to the fact that the account you are using is a personal account rather than a school or work account. The solution is as follows:

    When you get the token, do not use the /tenant-id endpoint to request the token when obtaining the token, as it only supports organizational logins, you should use the /common endpoint to log in to individual accounts.

    You also need to make sure your application supports personal accounts.

    User's image

    Reference link:

    https://learn.microsoft.com/en-us/answers/questions/2028587/how-to-fix-organizationfromtenantguidnotfound-whil

    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.

    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.