Skip to content

Instantly share code, notes, and snippets.

@dgroh
Created March 21, 2021 09:54
Show Gist options
  • Save dgroh/895f03f14959549e029dd14d8f24c2d7 to your computer and use it in GitHub Desktop.
Save dgroh/895f03f14959549e029dd14d8f24c2d7 to your computer and use it in GitHub Desktop.
Create an app registration to publish Microsoft Teams App
function NewAppRegistration() {
$appRegistrationName = "PublishTeamsApp"
$appRegistration = az ad app create `
--display-name $appRegistrationName `
--reply-urls "http://localhost/auth" `
--oauth2-allow-implicit-flow true `
--available-to-other-tenants false `
--required-resource-accesses "$PSScriptRoot/required-resource-accesses.json" `
-o json |
ConvertFrom-Json
az ad app permission admin-consent --id $appRegistration.appId
}
[{
"resourceAppId": "00000003-0000-0000-c000-000000000000",
"resourceAccess": [{
"id": "c5366453-9fb0-48a5-a156-24f0c49a4b84",
"type": "Scope"
},
{
"id": "1ca167d5-1655-44a1-8adf-1414072e1ef9",
"type": "Scope"
}
]
}]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment