diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a54c5d3fa6f..9e62d8510a3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -46,6 +46,7 @@ jobs: TENANT_ID: ${{secrets.tenant_id}} CLIENT_ID: ${{secrets.client_id}} CLIENT_SECRET: ${{secrets.client_secret}} + USER_ID: ${{secrets.user_id}} # The check-build-matrix returns success if all matrix jobs in build are successful; otherwise, it returns a failure. # Use this as a PR status check for GitHub Policy Service instead of individual matrix entry checks. diff --git a/packages/msgraph-sdk-tests/userTests.ts b/packages/msgraph-sdk-tests/userTests.ts index 81edfacdc2b..d4aea41465d 100644 --- a/packages/msgraph-sdk-tests/userTests.ts +++ b/packages/msgraph-sdk-tests/userTests.ts @@ -10,8 +10,12 @@ describe("TestGet", () => { }); it("should return messages for given user", async () => { + const userId = process.env.USER_ID; + if (!userId) { + throw Error("Missing USER_ID environment variable"); + } const messages = await graphServiceClient.users - .byUserId("a4bf4e43-981f-430c-8024-cdb645f8c098") + .byUserId(userId) .messages.get(); assert.isDefined(messages?.value); });