This commit is contained in:
Senthamil Sindhu 2024-07-08 13:45:54 -07:00
commit 8140f0edb1
2 changed files with 9 additions and 12 deletions

View File

@ -1,7 +1,8 @@
export interface QueryRequestOptions {
$skipToken?: string;
$top?: number;
subscriptions: string[];
$allowPartialScopes: boolean;
subscriptions?: string[];
}
export interface QueryResponse {

View File

@ -51,17 +51,13 @@ export async function fetchSubscriptionsFromGraph(accessToken: string): Promise<
do {
const body = {
query: subscriptionsQuery,
...(skipToken
? {
options: {
$skipToken: skipToken,
} as QueryRequestOptions,
}
: {
options: {
$top: 150,
} as QueryRequestOptions,
}),
options: {
$allowPartialScopes: true,
$top: 150,
...(skipToken && {
$skipToken: skipToken,
}),
} as QueryRequestOptions,
};
const response = await fetch(managementResourceGraphAPIURL, {