fix: revert use graph API target url for access token

Signed-off-by: drodil <heiccih@gmail.com>
This commit is contained in:
drodil
2023-02-16 09:21:08 +02:00
committed by blam
parent ec74b58caf
commit a4ebd51352
3 changed files with 7 additions and 2 deletions
@@ -53,7 +53,7 @@ describe('MicrosoftGraphClient', () => {
expect(await response.json()).toEqual({ value: 'example' });
expect(tokenCredential.getToken).toHaveBeenCalledTimes(1);
expect(tokenCredential.getToken).toHaveBeenCalledWith(
'https://example.com/.default',
'https://graph.microsoft.com/.default',
);
});
@@ -219,7 +219,7 @@ export class MicrosoftGraphClient {
): Promise<Response> {
// Make sure that we always have a valid access token (might be cached)
const token = await this.tokenCredential.getToken(
`${this.baseUrl}/.default`,
'https://graph.microsoft.com/.default',
);
if (!token) {