How to get localized response from Graph API

Prachi Verma 21 Reputation points Microsoft Employee
2022-09-08T09:49:52.683+00:00

We are trying to fetch AAD roles by hitting API 'GET https://graph.microsoft.com/v1.0/directoryRoles'.
Our requirement is to get the response in the preferred language of the user. Is there any way to pass the preferred language as a parameter to the graph API ?

Example of languages:
'fr-FR'
'af-ZA'
'hi-in'

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,587 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
19,466 questions
0 comments No comments
{count} votes

Accepted answer
  1. Sandeep G-MSFT 14,406 Reputation points Microsoft Employee
    2022-09-08T11:20:22.437+00:00

    @Prachi Verma

    Currently, there exist no localization support for the Graph API. The Graph API will return only in the language the data is stored in Azure Active Directory. There is no way to return any other language other than English, as the data stored in Azure AD is English language.

    Usually the logic is, graph API pulls the response from Azure active directory, and it should translate the response in users preferred language.

    At present graph API doesn't support language translations for response that it gets from Azure AD.

    It might be planned for future, but we do not have any ETA on that. You can track the features of graph API in https://developer.microsoft.com/en-us/graph/changelog/?search=

    Please "Accept the answer" if the information helped you. This will help us and others in the community as well.

    0 comments No comments

0 additional answers

Sort by: Most helpful