-
Notifications
You must be signed in to change notification settings - Fork 324
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New command: remove enterprise application. #6127
Conversation
Thank you @Saurabh7019, we'll try to review it ASAP! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well done @Saurabh7019, we're almost there. Let's first change some things before we continue.
src/m365/entra/commands/enterpriseapp/enterpriseapp-remove.spec.ts
Outdated
Show resolved
Hide resolved
Hi @Saurabh7019, as discussed here: #6155, I think we should rename the options. Sorry for that! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're almost there. Let's do a couple of fine-tunings before we merge it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me! Found 2 more small things we could/should fix, but that's something I could fix while merging the PR as well.
let spMatchQuery: string = ''; | ||
if (options.displayName) { | ||
spMatchQuery = `displayName eq '${formatting.encodeQueryParameter(options.displayName)}'`; | ||
} | ||
|
||
const spItemsResponse = await odata.getAllItems<{ id: string }>(`${this.resource}/v1.0/servicePrincipals?$filter=${spMatchQuery}&$select=id`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't we merge this code together now?
sinon.stub(request, 'get').callsFake(async (opts) => { | ||
if (opts.url === `https://graph.microsoft.com/v1.0/servicePrincipals?$filter=appId eq '65415bb1-9267-4313-bbf5-ae259732ee12'&$select=id`) { | ||
return spAppInfo; | ||
} | ||
|
||
throw 'Invalid request'; | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't need this stub anymore, right?
Merged manually, thank you! |
Closes #6111