How to get time zone setting for MSA user by Microsoft Graph REST API

Siyuan Zhu 21 Reputation points
2022-02-28T02:50:56.9+00:00

I'd like to get the msa user time zone setting by Microsoft Graph REST API

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,450 questions
{count} votes

Accepted answer
  1. CarlZhao-MSFT 40,311 Reputation points
    2022-02-28T09:59:41.447+00:00

    Hi @Siyuan Zhu

    You can get the user's time zone by calling the /me/settings/regionalAndLanguageSettings endpoint. This endpoint is available for a beta for now, in future, it may available in v1.0.

    GET https://graph.microsoft.com/beta/me/settings/regionalAndLanguageSettings  
      
    {  
        "defaultDisplayLanguage": {  
            "locale": "en-US",  
            "displayName": "English (United States)"  
        },  
        "authoringLanguages": [  
            {  
                "locale": "fr-FR",  
                "displayName": "French (France)"  
            },  
            {  
                "locale": "de-DE",  
                "displayName": "German (Germany)"  
            },  
        ],  
        "defaultTranslationLanguage": {  
            "locale": "en-US",  
            "displayName": "English (United States)"  
        },  
        "defaultSpeechInputLanguage": {  
            "locale": "en-US",  
            "displayName": "English (United States)"  
        },  
        "defaultRegionalFormat": {  
            "locale": "en-GB",  
            "displayName": "English (United Kingdom)"  
        },  
        "regionalFormatOverrides": {  
            "calendar": "Gregorian Calendar",  
            "firstDayOfWeek": "Sunday",  
            "shortDateFormat": "yyyy-MM-dd",  
            "longDateFormat": "dddd, MMMM d, yyyy",  
            "shortTimeFormat": "HH:mm",  
            "longTimeFormat": "h:mm:ss tt",  
            "timeZone": "Pacific Standard Time"  
        },  
        "translationPreferences": {  
            "translationBehavior": "Yes",  
            "languageOverrides": [  
                {  
                    "languageTag": "fr",  
                    "translationBehavior": "Yes"   
                }  
            ],  
            "untranslatedLanguages": ["de"]  
         }  
    }  
    

    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

0 additional answers

Sort by: Most helpful