Beispiel #1
0
        /*private async void  CallGraphButton_ClickAsync(object sender, RoutedEventArgs e)
         * {
         *  SDAuthLib sd = new SDAuthLib();
         * // string url = "https://api.support.microsoft.com";
         *  //TokenInfoText.Text += "Token: s" + Environment.NewLine;
         *  TokenInfoText.Text += $"Token: {sd.GetSDToken()}" + Environment.NewLine;
         *  TokenInfoText.Text += $"Token: {sd.AccessToken}" + Environment.NewLine;
         *  //TokenInfoText.Text += $"Token: {await GetHttpContentWithTokenAsync(url, sd.AccessToken)}" + Environment.NewLine;
         *
         * }*/
        private void CallGraphButton_Click(object sender, RoutedEventArgs e)
        {
            TokenInfoText.Text = string.Empty;
            SDAuthLib sd = new SDAuthLib();

            //TokenInfoText.Text += $"Token: {sd.GetSDToken()}" + Environment.NewLine;
            sd.GetSDToken(true);
            TokenInfoText.Text += $"Token: {sd.AccessToken}" + Environment.NewLine;
        }
        private void CallGraphButton_Click(object sender, RoutedEventArgs e)
        {
            SDAuthLib sd = new SDAuthLib();

            sd.GetSDToken();
            //SDAuthLib.ReadOrCreateADALTokenCache();

            string token = sd.AccessToken;

            ResultWrite(token);
            sd.ClearToken();
            //  CaseIdReader.ExcelTest();
        }