forked from microsoft/CopilotStudioSamples
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathConfigure-McsForSite.ps1
41 lines (31 loc) · 893 Bytes
/
Configure-McsForSite.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
param (
[Parameter(Mandatory=$true)]
[string]$siteUrl,
[Parameter(Mandatory=$true)]
[string]$botUrl,
[Parameter(Mandatory=$true)]
[string]$botName,
[Parameter(Mandatory=$true)]
[string]$customScope,
[Parameter(Mandatory=$true)]
[string]$clientId,
[Parameter(Mandatory=$true)]
[string]$authority,
[Parameter(Mandatory=$true)]
[string]$buttonLabel,
[Parameter(Mandatory=$true)]
[switch]$greet
)
Connect-PnPOnline -Url $siteUrl -Interactive
$action = (Get-PnPCustomAction | Where-Object { $_.Title -eq "PvaSso" })[0]
$action.ClientSideComponentProperties = @{
"botURL" = $botUrl
"customScope" = $customScope
"clientID" = $clientId
"authority" = $authority
"greet" = $greet.isPresent
"buttonLabel" = $buttonLabel
"botName" = $botName
} | ConvertTo-Json -Compress
$action.Update()
Invoke-PnPQuery