mirror of
https://github.com/azure/login.git
synced 2026-03-15 09:20:56 -04:00
Added no subscription support (#73)
* Added no subscription support * Added L0s * added no subcriptions login support * test changes Co-authored-by: Ganesh S <ganeshs@CBREV-KESTUR.redmond.corp.microsoft.com> Co-authored-by: aksm-ms <58936966+aksm-ms@users.noreply.github.com>
This commit is contained in:
@@ -12,7 +12,7 @@ export default class ScriptBuilder {
|
||||
command += `Connect-AzAccount -ServicePrincipal -Tenant '${tenantId}' -Credential \
|
||||
(New-Object System.Management.Automation.PSCredential('${args.servicePrincipalId}',(ConvertTo-SecureString '${args.servicePrincipalKey.replace("'", "''")}' -AsPlainText -Force))) \
|
||||
-Environment '${args.environment}' | out-null;`;
|
||||
if (args.scopeLevel === Constants.Subscription) {
|
||||
if (args.scopeLevel === Constants.Subscription && !args.allowNoSubscriptionsLogin) {
|
||||
command += `Set-AzContext -SubscriptionId '${args.subscriptionId}' -TenantId '${tenantId}' | out-null;`;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user