Created
July 8, 2018 18:12
-
-
Save buchizo/2f963cd4ff6a7e24fb0d7bb669d46bb2 to your computer and use it in GitHub Desktop.
AADToken
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Console.Write("input your AzureAD tenant name: "); | |
var tenantName = Console.ReadLine(); | |
Console.Write("input your media services endpoint: "); | |
var endpoint = Console.ReadLine(); | |
Console.Write("input your client id: "); | |
var clientId = Console.ReadLine(); | |
Console.Write("input your client secret: "); | |
var clientSecret = Console.ReadLine(); | |
var tokenCredentials = new AzureAdTokenCredentials( | |
tenant: tenantName, // Azure ADテナント名 | |
clientSymmetricKey: new AzureAdClientSymmetricKey( | |
clientId: clientId, // Service Principal の ClientID | |
clientKey: clientSecret // Service Principal の Secret | |
), | |
azureEnvironment: AzureEnvironments.AzureCloudEnvironment | |
); | |
var tokenProvider = new AzureAdTokenProvider(tokenCredentials); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment