Last active
December 15, 2017 04:04
-
-
Save justinyoo/231c595c411791fc4aba4da3a9e01c68 to your computer and use it in GitHub Desktop.
Dynamic Access to Azure Functions Host Keys without KUDU
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
# NOTE: This is NOT a real tenant Id, subscription Id, client Id nor client secret. Use yours. | |
$tenantId = "32a489b1-612c-4d44-b4dd-714376ac7479" | |
$subscriptionId = "4ba9940b-0057-4184-9965-eb686c3027bc" | |
$clientId = "310c7137-af66-4bb1-ac76-c4cb4fcbe4e1" | |
$clientSecret = "QMvihWUWlRuPs3nNjxxzR/rULyKOAibRBkWDsbokzqw=" | |
$authUri = "https://login.microsoftonline.com/$tenantId/oauth2/token?api-version=1.0" | |
$resourceUri = "https://management.core.windows.net/" | |
$authRequestBody = @{} | |
$authRequestBody.grant_type = "client_credentials" | |
$authRequestBody.resource = $resourceUri | |
$authRequestBody.client_id = $clientId | |
$authRequestBody.client_secret = $clientSecret | |
$auth = Invoke-RestMethod -Uri $authUri -Method Post -Body $authRequestBody |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment