fix: revert use graph API target url for access token
Signed-off-by: drodil <heiccih@gmail.com>
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user