Skip to content

Remove usage of Lab API for integration test config#8289

Closed
Avery-Dunn wants to merge 18 commits intodevfrom
avdunn/test-migration
Closed

Remove usage of Lab API for integration test config#8289
Avery-Dunn wants to merge 18 commits intodevfrom
avdunn/test-migration

Conversation

@Avery-Dunn
Copy link
Contributor

@Avery-Dunn Avery-Dunn commented Feb 3, 2026

Currently a draft PR that only changes a few tests, in order to help with discussions and confirm this is the right direction for the changes.

This PR makes similar changes to what is being done in other MSALs:
AzureAD/microsoft-authentication-library-for-java#1002
AzureAD/microsoft-authentication-library-for-dotnet#5631
AzureAD/microsoft-authentication-library-for-go#593
AzureAD/microsoft-authentication-library-for-python#870

Historically, integration tests in MSAL and MISE retrieved user/app/tenant/etc. info from our API at "https://msidlab.com/api/"

That API is being deprecated in favor of a key vault-based system: instead of dynamic config based on query parameters, we have a simpler set of config stored as key vault secrets.

This PR refactors the integration tests to retrieve the config they need from those key vaults instead of the API:

  • labUtils : A new group of helper classes/functions/etc. which retrieves and parses test config from key vaults
    • Filenames and internal behavior more-or-less match what has been done in other MSALs, while still trying to match the style of the existing e2eTestUtils
  • client-credentials-aad.spec.ts : Tests were adjusted to use the new helpers in labUtils
    • Meant to demonstrate how existing tests can be minimally changed to use the new system
  • obo-aad-kv.spec.ts : New tests that match the OBO style of other MSALS, particularly MSAL .NET
    • Meant to demonstrate how integration tests can be easily converted from one MSAL to the other if the underlying utilities are similar
    • Mainly an example, and likely will not be included by the time this PR moves out of draft

@Avery-Dunn Avery-Dunn requested review from a team as code owners February 3, 2026 23:11
Copilot AI review requested due to automatic review settings February 3, 2026 23:11
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR migrates integration tests from the deprecated Lab API (msidlab.com/api/) to a Key Vault-based configuration system, aligning with changes made in other MSAL libraries (Java, .NET, Go, Python).

Changes:

  • Introduces new labUtils package for Key Vault-based test configuration retrieval
  • Refactors client-credentials-aad.spec.ts to use Key Vault instead of Lab API
  • Adds new obo-aad-kv.spec.ts as example OBO tests using Key Vault (marked for potential removal)
  • Minor formatting fix to obo-aad.spec.ts (trailing comma)

Reviewed changes

Copilot reviewed 17 out of 19 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
samples/labUtils/* New utility package for retrieving test config from Azure Key Vault instead of Lab API
samples/msal-node-samples/client-credentials/test/client-credentials-aad.spec.ts Updated to use Key Vault-based config via labUtils
samples/msal-node-samples/on-behalf-of/test/obo-aad-kv.spec.ts New example test demonstrating OBO with Key Vault config
samples/msal-node-samples/on-behalf-of/test/obo-aad.spec.ts Minor formatting fix (trailing comma)
samples/msal-node-samples/*/package.json Added lab-utils dependency
samples/labUtils/package.json Package definition for new labUtils utility
package-lock.json Dependency updates for lab-utils package

@Avery-Dunn Avery-Dunn changed the base branch from dev to msal-v5 February 10, 2026 20:56
@Avery-Dunn Avery-Dunn changed the base branch from msal-v5 to dev February 10, 2026 20:57
@Avery-Dunn
Copy link
Contributor Author

Closing in favor of a branch based on msal-v5 instead of dev: #8319

@Avery-Dunn Avery-Dunn closed this Feb 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants