Skip to content

Commit 6939294

Browse files
authored
Merge pull request #106536 from metanMSFT/metan/update-immersive-reader-script
[CogSvcs] Immersive Reader: Ensure URI is valid in powershell script
2 parents 82ea7e1 + 73e0f5e commit 6939294

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: "Create an Immersive Reader Resource"
33
titleSuffix: Azure Cognitive Services
4-
description: This article will show you how to create a new Immersive Reader resource with a custom subdomain and then configure Azure AD in your Azure tenant.
4+
description: This article will show you how to create a new Immersive Reader resource with a custom subdomain and then configure Azure AD in your Azure tenant.
55
services: cognitive-services
66
author: rwaller
77
manager: guillasi
@@ -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)