The tenant for tenant guid <tenant id> does not exist

Tag 9 0 Reputation points
2024-09-21T06:51:14.6633333+00:00

I registered Azure Active Directory and send add user by OAuth2.0 (this new account for free and test)

now we use this user get email by sms api https://graph.microsoft.com/v1.0/users/{user-id}/messages

and responsed error , The tenant for tenant guid <tenant id> does not exist

Thanks

URL: https://graph.microsoft.com/v1.0/users/user_id/messages

{
    "error": {
        "code": "OrganizationFromTenantGuidNotFound",
        "message": "The tenant for tenant guid '<tenant_id>' does not exist.",
        "innerError": {
            "oAuthEventOperationId": "c6ba7a51-d9aa-4e6e-a4d1-3bd02053b186",
            "oAuthEventcV": "xvL89L+YTxLm7TsWy58trQ.1",
            "errorUrl": "https://aka.ms/autherrors#error-InvalidTenant",
            "requestId": "30c192f6-7ac8-4c61-9ff7-08568985def1",
            "date": "2024-09-21T06:13:06"
        }
    }
}
Azure API Management
Azure API Management
An Azure service that provides a hybrid, multi-cloud management platform for APIs.
2,123 questions
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
12,023 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
21,779 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. CarlZhao-MSFT 42,026 Reputation points
    2024-09-23T01:59:29.75+00:00

    Hi @Tag 9

    This is because your tenant lacks an MS 365 license. When you try to access MS 365 resources, an MS 365 license will be necessary.

    Before doing, please try to purchase (or free trial) an MS 365 license for your tenant, then go to MS Entra ID to assign the license to the current user.

    5bf81d28-738d-47ee-9ba8-a4c1b2bc6462

    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.


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.