How to use the @azure/ms-rest-nodeauth.loginWithServicePrincipalSecretWithAuthResponse function in @azure/ms-rest-nodeauth

To help you get started, we’ve selected a few @azure/ms-rest-nodeauth examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github tmobile / jazz / builds / jazz_azure-create-service / components / ClientFactory.js View on Github external
async login() {
    	try {
    		const authResponse = await msRestNodeAuth.loginWithServicePrincipalSecretWithAuthResponse(this.clientId, this.clientSecret, this.tenantId);
        	this.credentials = authResponse.credentials
  		} catch (err) {
    		console.log(err);
  		}
    }
github serverless / serverless-azure-functions / src / services / loginService.ts View on Github external
public async servicePrincipalLogin(clientId: string, secret: string, tenantId: string, options: AzureTokenCredentialsOptions): Promise {
    return await loginWithServicePrincipalSecretWithAuthResponse(clientId, secret, tenantId, options);
  }
}
github Azure / ng-deploy-azure / src / util / azure / auth.ts View on Github external
}

  if (TENANT_ID) {
    logger.info(`Using TENANT_ID=${TENANT_ID}`);
  } else {
    throw new Error('TENANT_ID is required in CI mode');
  }

  if (AZURE_SUBSCRIPTION_ID) {
    logger.info(`Using AZURE_SUBSCRIPTION_ID=${AZURE_SUBSCRIPTION_ID}`);
  } else {
    throw new Error('AZURE_SUBSCRIPTION_ID is required in CI mode');
  }
  logger.info(`Configuration OK`);

  auth = await loginWithServicePrincipalSecretWithAuthResponse(CLIENT_ID, CLIENT_SECRET, TENANT_ID);

  globalConfig.set(AUTH, auth);

  return auth;
}