How to determine the user's country code in Azure AD











up vote
0
down vote

favorite












I'm trying to determine the user's time zone in the BOT that I created. This Bot can be user worldwide and the only way for me to determine the user's timezone is to determine his country (because the channel that i user is skype and there isn't any information about the user's TZ unlike other channel's).



So is there a way to determine the client's country code in azure AD ?










share|improve this question






















  • You are talking about "Skype" and "Azure AD"... What is the link here? Skype users are not necessary users registered in an Azure AD. Or did you mean Skype for Business?
    – Nicolas R
    Nov 8 at 13:29












  • Excuse me. Yes i meant skype for business channel.
    – Soufien Hajji
    Nov 8 at 16:51










  • Many countries have more than one time zone. Determining the country isn't enough to determine a time zone.
    – Matt Johnson
    Nov 8 at 19:22










  • I totally understand that country isn't a good reference to determine the timezone but i'm out of options here and i don't see any other choice.
    – Soufien Hajji
    Nov 9 at 9:37















up vote
0
down vote

favorite












I'm trying to determine the user's time zone in the BOT that I created. This Bot can be user worldwide and the only way for me to determine the user's timezone is to determine his country (because the channel that i user is skype and there isn't any information about the user's TZ unlike other channel's).



So is there a way to determine the client's country code in azure AD ?










share|improve this question






















  • You are talking about "Skype" and "Azure AD"... What is the link here? Skype users are not necessary users registered in an Azure AD. Or did you mean Skype for Business?
    – Nicolas R
    Nov 8 at 13:29












  • Excuse me. Yes i meant skype for business channel.
    – Soufien Hajji
    Nov 8 at 16:51










  • Many countries have more than one time zone. Determining the country isn't enough to determine a time zone.
    – Matt Johnson
    Nov 8 at 19:22










  • I totally understand that country isn't a good reference to determine the timezone but i'm out of options here and i don't see any other choice.
    – Soufien Hajji
    Nov 9 at 9:37













up vote
0
down vote

favorite









up vote
0
down vote

favorite











I'm trying to determine the user's time zone in the BOT that I created. This Bot can be user worldwide and the only way for me to determine the user's timezone is to determine his country (because the channel that i user is skype and there isn't any information about the user's TZ unlike other channel's).



So is there a way to determine the client's country code in azure AD ?










share|improve this question













I'm trying to determine the user's time zone in the BOT that I created. This Bot can be user worldwide and the only way for me to determine the user's timezone is to determine his country (because the channel that i user is skype and there isn't any information about the user's TZ unlike other channel's).



So is there a way to determine the client's country code in azure AD ?







timezone azure-active-directory botframework






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 8 at 9:49









Soufien Hajji

76110




76110












  • You are talking about "Skype" and "Azure AD"... What is the link here? Skype users are not necessary users registered in an Azure AD. Or did you mean Skype for Business?
    – Nicolas R
    Nov 8 at 13:29












  • Excuse me. Yes i meant skype for business channel.
    – Soufien Hajji
    Nov 8 at 16:51










  • Many countries have more than one time zone. Determining the country isn't enough to determine a time zone.
    – Matt Johnson
    Nov 8 at 19:22










  • I totally understand that country isn't a good reference to determine the timezone but i'm out of options here and i don't see any other choice.
    – Soufien Hajji
    Nov 9 at 9:37


















  • You are talking about "Skype" and "Azure AD"... What is the link here? Skype users are not necessary users registered in an Azure AD. Or did you mean Skype for Business?
    – Nicolas R
    Nov 8 at 13:29












  • Excuse me. Yes i meant skype for business channel.
    – Soufien Hajji
    Nov 8 at 16:51










  • Many countries have more than one time zone. Determining the country isn't enough to determine a time zone.
    – Matt Johnson
    Nov 8 at 19:22










  • I totally understand that country isn't a good reference to determine the timezone but i'm out of options here and i don't see any other choice.
    – Soufien Hajji
    Nov 9 at 9:37
















You are talking about "Skype" and "Azure AD"... What is the link here? Skype users are not necessary users registered in an Azure AD. Or did you mean Skype for Business?
– Nicolas R
Nov 8 at 13:29






You are talking about "Skype" and "Azure AD"... What is the link here? Skype users are not necessary users registered in an Azure AD. Or did you mean Skype for Business?
– Nicolas R
Nov 8 at 13:29














Excuse me. Yes i meant skype for business channel.
– Soufien Hajji
Nov 8 at 16:51




Excuse me. Yes i meant skype for business channel.
– Soufien Hajji
Nov 8 at 16:51












Many countries have more than one time zone. Determining the country isn't enough to determine a time zone.
– Matt Johnson
Nov 8 at 19:22




Many countries have more than one time zone. Determining the country isn't enough to determine a time zone.
– Matt Johnson
Nov 8 at 19:22












I totally understand that country isn't a good reference to determine the timezone but i'm out of options here and i don't see any other choice.
– Soufien Hajji
Nov 9 at 9:37




I totally understand that country isn't a good reference to determine the timezone but i'm out of options here and i don't see any other choice.
– Soufien Hajji
Nov 9 at 9:37












1 Answer
1






active

oldest

votes

















up vote
0
down vote













Assuming you are having your users login to your bot with AAD, you could use the same token to access the user's profile via the Microsoft Graph API. The profile will give the users office location which you could then map to for a possible location. It won't account for a user who might be traveling but, it's an option.



You can read the Microsoft Graph docs to learn more and experiment using the Graph Explorer.



As I don't know which SDK or version you are using, if you visit the BotBuilder repo you can find links to samples on how to build a bot that uses OAuth and makes calls to Microsoft Graph.






share|improve this answer





















    Your Answer






    StackExchange.ifUsing("editor", function () {
    StackExchange.using("externalEditor", function () {
    StackExchange.using("snippets", function () {
    StackExchange.snippets.init();
    });
    });
    }, "code-snippets");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "1"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














     

    draft saved


    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53205168%2fhow-to-determine-the-users-country-code-in-azure-ad%23new-answer', 'question_page');
    }
    );

    Post as a guest
































    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    0
    down vote













    Assuming you are having your users login to your bot with AAD, you could use the same token to access the user's profile via the Microsoft Graph API. The profile will give the users office location which you could then map to for a possible location. It won't account for a user who might be traveling but, it's an option.



    You can read the Microsoft Graph docs to learn more and experiment using the Graph Explorer.



    As I don't know which SDK or version you are using, if you visit the BotBuilder repo you can find links to samples on how to build a bot that uses OAuth and makes calls to Microsoft Graph.






    share|improve this answer

























      up vote
      0
      down vote













      Assuming you are having your users login to your bot with AAD, you could use the same token to access the user's profile via the Microsoft Graph API. The profile will give the users office location which you could then map to for a possible location. It won't account for a user who might be traveling but, it's an option.



      You can read the Microsoft Graph docs to learn more and experiment using the Graph Explorer.



      As I don't know which SDK or version you are using, if you visit the BotBuilder repo you can find links to samples on how to build a bot that uses OAuth and makes calls to Microsoft Graph.






      share|improve this answer























        up vote
        0
        down vote










        up vote
        0
        down vote









        Assuming you are having your users login to your bot with AAD, you could use the same token to access the user's profile via the Microsoft Graph API. The profile will give the users office location which you could then map to for a possible location. It won't account for a user who might be traveling but, it's an option.



        You can read the Microsoft Graph docs to learn more and experiment using the Graph Explorer.



        As I don't know which SDK or version you are using, if you visit the BotBuilder repo you can find links to samples on how to build a bot that uses OAuth and makes calls to Microsoft Graph.






        share|improve this answer












        Assuming you are having your users login to your bot with AAD, you could use the same token to access the user's profile via the Microsoft Graph API. The profile will give the users office location which you could then map to for a possible location. It won't account for a user who might be traveling but, it's an option.



        You can read the Microsoft Graph docs to learn more and experiment using the Graph Explorer.



        As I don't know which SDK or version you are using, if you visit the BotBuilder repo you can find links to samples on how to build a bot that uses OAuth and makes calls to Microsoft Graph.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 8 at 19:27









        Steven Kanberg

        5041416




        5041416






























             

            draft saved


            draft discarded



















































             


            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53205168%2fhow-to-determine-the-users-country-code-in-azure-ad%23new-answer', 'question_page');
            }
            );

            Post as a guest




















































































            Popular posts from this blog

            Schultheiß

            Liste der Kulturdenkmale in Wilsdruff

            Android Play Services Check