- By Edmond Lau
- Highly Recommended 👍
- http://www.theeffectiveengineer.com/
- They are the people who get things done. Effective Engineers produce results.
{ | |
"client_id": "", | |
"client_secret": "", | |
"grant_type": "authorization_code", | |
"code": "", | |
"redirect_uri": "" | |
} |
# Using Service Principal | |
tenantid=xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxx | |
clientid=xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxx | |
clientsecret=xxx....xxxx | |
# Reqeust Bearer Token | |
token=$(curl -s -X POST -H 'Content-Type: application/x-www-form-urlencoded' \ | |
-d "grant_type=client_credentials&resource=https%3A%2F%2Fmanagement.azure.com%2F&client_id=$clientid&client_secret=$clientsecret" \ | |
"https://login.microsoftonline.com/$tenantid/oauth2/token" | jq -r .access_token) |
terraform { | |
required_providers { | |
azurerm = { | |
source = "hashicorp/azurerm" | |
version = "~>2.74.0" | |
} | |
} | |
} | |
# data "azurerm_client_config" "current" {} |
SP.SOD.executeFunc("clienttemplates.js", "SPClientTemplates", function() { | |
function getBaseHtml(ctx) { | |
return SPClientTemplates["_defaultTemplates"].Fields.default.all.all[ctx.CurrentFieldSchema.FieldType][ctx.BaseViewID](ctx); | |
} | |
function init() { | |
SPClientTemplates.TemplateManager.RegisterTemplateOverrides({ | |
OnPreRender: function(ctx) { | |
ctx.newFormUrl = "https://microsoft.com"; |