We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7b8a432 commit 0626a07Copy full SHA for 0626a07
articles/active-directory/develop/test-automate-integration-testing.md
@@ -299,6 +299,18 @@ let tokenCache;
299
const KVUri = keyVaultConfig.keyVaultUri;
300
const secretName = keyVaultConfig.secretName;
301
302
+async function getCredentials() {
303
+ try {
304
+ const credential = new DefaultAzureCredential();
305
+ const secretClient = new SecretClient(KVUri, credential);
306
+ const secret = await secretClient.getSecret(keyVaultConfig.secretName);
307
+ const password = secret.value;
308
+ return [secretName, password];
309
+ } catch (error) {
310
+ console.log(error);
311
+ }
312
+}
313
+
314
test.beforeAll(async () => {
315
const pca = new PublicClientApplication(msalConfig);
316
const [username, password] = await getCredentials();
0 commit comments