Permission | Id |
---|---|
AgreementAcceptance.Read.All | d8e4ec18-f6c0-4620-8122-c8b1f2bf400e |
Agreement.ReadWrite.All | c9090d00-6101-42f0-a729-c41074260d47 |
This file contains hidden or 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
function PublishTeamsApp($FilePath, $AuthorizationToken) { | |
$baseUrl = "https://graph.microsoft.com/v1.0/appCatalogs/teamsApps" | |
$headers = @{} | |
$headers.Add("Authorization", "Bearer $AuthorizationToken") | |
$headers.Add("Content-Type", "application/zip") | |
try { | |
Invoke-RestMethod -Uri $baseUrl -Method 'POST' -Headers $headers -InFile $FilePath | |
} | |
catch { |
This file contains hidden or 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
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 | |
This file contains hidden or 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
// eslint-disable-next-line | |
const should = require('should') | |
const sinon = require('sinon'); | |
const proxyquire = require('proxyquire'); | |
describe('userRouter', () => { | |
let expressStub; | |
let controllerStub; | |
let RouterStub; | |
let rootRouteStub; |