error when using Microsoft graph api

killua Zoldyck 0 Reputation points
2023-11-28T16:58:54.28+00:00

when i use Graph api to send message using spring boot this error occurs :

2023-11-28T18:41:39.245+02:00 INFO 11156 --- [onPool-worker-1] c.azure.identity.ClientSecretCredential : Azure Identity => getToken() result for scopes [https://graph.microsoft.com/.default]: SUCCESS

2023-11-28T18:41:39.911+02:00 ERROR 11156 --- [nio-8080-exec-3] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed: java.lang.RuntimeException: Error code: OrganizationFromTenantGuidNotFound

Error message: The tenant for tenant guid '621dfebb-d66c-4f56-b914-fd3f6b043553' does not exist.

although i am a pretty sure that the tenant id is correct

Microsoft Security Microsoft Graph
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. CarlZhao-MSFT 46,366 Reputation points
    2023-11-29T08:07:24.46+00:00

    Hi @killua Zoldyck

    Make sure your tenant has Office 365 licenses and assign them to target users.

    User's image

    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.