Getting InternalServerError- Unable to find target address in GET https://graph.microsoft.com/v1.0/organization?%24select=displayName

Atul Gupta 1 Reputation point
2021-07-16T14:33:13.203+00:00

Expected behavior

I am calling organisation api as below using MS Graph Java SDK in an android application

graphServiceClient.organization()
.buildRequest()
.select("displayName").get().currentPage
For normal users(in microsoft tenant), it should retrun empty list

Actual behavior

While calling the above api, it is giving 500 Internal server error. Actual response is as below

   GET https://graph.microsoft.com/v1.0/organization?%24select=displayName      
   SdkVersion : graph-java/v2.10.0      
   Authorization : [PII_REDACTED]      
   500 : Internal Server Error      
   client-request-id : 6a83fc4a-4c4a-413a-916d-94c350f098e4      
   Content-Type : application/json      
   Date : Thu, 15 Jul 2021 05:22:21 GMT      
   request-id : bf4e22be-d4db-44d7-84fc-49652258aef5      
   Strict-Transport-Security : max-age=31536000      
   Transfer-Encoding : chunked      
   Vary : Accept-Encoding      
   x-ms-ags-diagnostic : {"ServerInfo":{"DataCenter":"South India","Slice":"E","Ring":"2","ScaleUnit":"002","RoleInstance":"MA1PEPF00001B2F"}}      
   {      
     "error": {      
       "code": "InternalServerError",      
       "message": "Unable to find target address",      
       "innerError": {      
         "date": "2021-07-15T05:22:22",      
         "request-id": "bf4e22be-d4db-44d7-84fc-49652258aef5",      
         "client-request-id": "6a83fc4a-4c4a-413a-916d-94c350f098e4"      
       }      
     }      
   }  

But for business users(other than Microsoft normal tenant), it is working fine      

Steps to reproduce the behavior via MS graph java sdk is as below

   graphServiceClient.organization()      
        .buildRequest()      
        .select("displayName").get().currentPage  

This is also reproducible in MS graph explorer at https://developer.microsoft.com/en-us/graph/graph-explorer using any personal account for api end points: https://graph.microsoft.com/v1.0/organization with GET HTTP method   

This is reproducible every time for personal microsoft account(with domail @Karima ben .com)

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,649 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Shweta Choudhary 601 Reputation points Microsoft Employee
    2021-09-27T09:17:05.383+00:00

    Thank you for reaching out.

    The organization resource type represents the Azure Active Directory tenant that the user or application is signed in to. This explains the reason for getting 500 internal server error for personal accounts as they are not supported for this endpoint.

    Thanks.

    1 person found this answer helpful.