Throw error if deprecated parameter -UserAuth is passed (#6691)

Co-authored-by: Ben Broderick Phillips <bebroder@microsoft.com>
This commit is contained in:
Azure SDK Bot 2025-08-07 11:17:09 -07:00 committed by GitHub
parent 28a55c5161
commit 236acb5edd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -129,6 +129,11 @@ param (
$wellKnownTMETenants = @('70a036f6-8e4d-4615-bad6-149c02e7720d')
# People keep passing this legacy parameter. Throw an error to save them future keystrokes
if ($NewTestResourcesRemainingArguments -like '*UserAuth*') {
throw "The -UserAuth parameter is deprecated and is now the default behavior"
}
if (!$ServicePrincipalAuth) {
# Clear secrets if not using Service Principal auth. This prevents secrets
# from being passed to pre- and post-scripts.