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.
- 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.
- 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. - 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.
- 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.