@@ -116,7 +116,7 @@ Write-Host "Requirement check complete!!"
116
116
117
117
$errorActionPreference = "Stop"
118
118
119
- $templateUri = "https://raw.githubusercontent.com/SystemCenterServiceManager /SMOMSConnector/master/azuredeploy.json"
119
+ $templateUri = "https://raw.githubusercontent.com/Azure /SMOMSConnector/master/azuredeploy.json"
120
120
121
121
if(!$siteNamePrefix)
122
122
{
147
147
$rand = Get-Random -Maximum 32000
148
148
149
149
$siteName = $siteNamePrefix + $rand
150
-
151
- $resource = Find -AzResource -ResourceNameContains $siteName -ResourceType Microsoft.Web/sites
150
+
151
+ $resource = Get -AzResource -Name $siteName -ResourceType Microsoft.Web/sites
152
152
153
153
}while($resource)
154
154
@@ -187,9 +187,9 @@ Write-Output "Web App Deployed successfully!!"
187
187
188
188
Add-Type -AssemblyName System.Web
189
189
190
- $clientSecret = [System.Web.Security.Membership]::GeneratePassword(30,2).ToString()
190
+ $secret = [System.Web.Security.Membership]::GeneratePassword(30,2).ToString()
191
+ $clientSecret = $secret | ConvertTo-SecureString -AsPlainText -Force
191
192
192
- $clientSecret = $clientSecret | ConvertTo-SecureString -AsPlainText -Force
193
193
194
194
try
195
195
{
@@ -229,11 +229,13 @@ try
229
229
ForEach ($item in $appSettingList) {
230
230
$appSettings[$item.Name] = $item.Value
231
231
}
232
+
232
233
$appSettings['ida:Tenant'] = $tenant
233
234
$appSettings['ida:Audience'] = $azureSite
234
235
$appSettings['ida:ServerName'] = $serverName
235
236
$appSettings['ida:Domain'] = $domain
236
237
$appSettings['ida:Username'] = $userName
238
+ $appSettings['ida:WhitelistedClientId'] = $clientId
237
239
238
240
$connStrings = @{}
239
241
$kvp = @{"Type"="Custom"; "Value"=$password}
@@ -279,7 +281,7 @@ if(!$resourceProvider -or $resourceProvider[0].RegistrationState -ne "Registered
279
281
}
280
282
}
281
283
282
- $resource = Find -AzResource -ResourceNameContains $serviceName -ResourceType Microsoft.Relay/namespaces
284
+ $resource = Get -AzResource -Name $serviceName -ResourceType Microsoft.Relay/namespaces
283
285
284
286
if(!$resource)
285
287
{
@@ -309,13 +311,11 @@ Write-Host "App Details"
309
311
Write-Host "============"
310
312
Write-Host "App Name:" $siteName
311
313
Write-Host "Client Id:" $clientId
312
- Write-Host "Client Secret:" $clientSecret
314
+ Write-Host "Client Secret:" $secret
313
315
Write-Host "URI:" $azureSite
314
316
if(!$err)
315
317
{
316
318
Write-Host "ServiceBus Namespace:" $serviceName
317
- }
318
-
319
- ```
319
+ }```
320
320
## Next steps
321
321
[Configure the Hybrid connection](../../azure-monitor/platform/itsmc-connections.md#configure-the-hybrid-connection).
0 commit comments