Skip to content

Instantly share code, notes, and snippets.

@jongio
Created November 19, 2019 22:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jongio/94412b84e433ab4795072b60c747cc17 to your computer and use it in GitHub Desktop.
Save jongio/94412b84e433ab4795072b60c747cc17 to your computer and use it in GitHub Desktop.
using System;
using Azure.Identity;
namespace graphapitest
{
class Program
{
static void Main(string[] args)
{
var cred = new DefaultAzureCredential(new DefaultAzureCredentialOptions() { SharedTokenCacheUsername = "email@email.com" });
var t = cred.GetToken(new Azure.Core.TokenRequestContext(new[] { "https://graph.microsoft.com/.default" }));
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment