Skip to content

Commit bbb2ed3

Browse files
committed
Immersive Reader: Ensure URI is valid in powershell script
1 parent d1be1e5 commit bbb2ed3

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

articles/cognitive-services/immersive-reader/how-to-create-immersive-reader.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,11 @@ The script is designed to be flexible. It will first look for existing Immersive
4343
[Parameter(Mandatory=$true)] [String] $AADAppClientSecret
4444
)
4545
{
46+
$unused = ''
47+
if (-not [System.Uri]::TryCreate($AADAppIdentifierUri, [System.UriKind]::Absolute, [ref] $unused)) {
48+
throw "Error: AADAppIdentifierUri must be a valid URI"
49+
}
50+
4651
Write-Host "Setting the active subscription to '$SubscriptionName'"
4752
$subscriptionExists = Get-AzSubscription -SubscriptionName $SubscriptionName
4853
if (-not $subscriptionExists) {

0 commit comments

Comments
 (0)