-
Notifications
You must be signed in to change notification settings - Fork 330
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: create custom AAD app for use with the CLI #1963
Comments
@pnp/cli-for-microsoft-365-maintainers I'd love your feedback. In particular, I'd appreciate if you thought about:
|
Great suggestion! 👏 Some of my thoughts...
I don't think it needs to be anymore than what it is.
I would prefer
Thinking from a best practice perspective, certificate is more secure than providing a password or secret, so I think we should promote this as such. See below statement on the
Microsoft have provided some guidance on the validity period of certificates based on length in the past (https://techcommunity.microsoft.com/t5/configuration-manager-archive/recommendations-for-pki-key-lengths-and-validity-periods-with/ba-p/272758).
I think that one year would be a good starting point, coincidentally when creating a secret in the Azure Portal the validity period defaults to one year also. |
Hi, For example:
etc. Not sure if we should have a separate parameter for this. As return type I would also return the Azure AD Url to the app. br, |
Love this, great idea 👏🏻 |
Thanks for your thoughts gents! Here are some thoughts:
How about I like the suggestion to use a cert instead of a secret. I thought first of using a secret, because it doesn't expire. Since there is no reminder on expiring certs, admins are often getting surprised when things stop working. If we were to use a cert, then we should return the expiration date of the generated cert. As for permissions: there is something to say for using permission sets that you mentioned, but I would still allow users to specify their own permissions as listed in AAD. So perhaps these sets could be exposed in a separate option named |
Works for me 👍🏻
Agreed.
Agreed, I like the idea of permission sets. |
Updated spec. Is it good to go now? |
Ship it 😊 |
Actually, can we change Like you said in another issue, we don't use them in option names so using them in values doesn't seem right. |
Spec updated. Is it ready to go? |
Ship it (again) 🙂 🚀 |
Hi, if this idea/task is still valid then I would like to take care of it :) |
Looks still valid to me, thanks! 👍 |
One comment from my side which we already talked about internally is that we could reuse a lot of code from the |
Also we could wait a bit for that improvement #5870 Pointed out by @martinlingstuyl. Currently this is the last thing not covered yet Since we don't call sub-commands anymore, this issue doesn't really matter, does it? |
I think I wrote that one comment above 😉 |
so if I understand correctly, I should wait for the change until @martinlingstuyl makes his adjustments. Regarding the util comment from @Adam-it, would it be included in Martin's change, or should I move it into my commits? |
Hi @mkm17, the other issue is still in help wanted mode, I'm currently not working on it. Aside from that: you could also just start and build the feature here. We'll need some shared code anyway, and you could include the code to update the public client flows toggle along with what you're building. Thoughts? @pnp/cli-for-microsoft-365-maintainers |
Exactly what I was thinking. |
yep. I would also not wait for this feature if you are ready to go 🚀. I would:
|
Maybe a bit late on this, but shouldn't we align this issue with how we add permissions on applications? (using |
@martinlingstuyl, as I understand, instead of choosing the |
Alternate idea: It would then be an optionset @mkm17, specify either |
Ideas @pnp/cli-for-microsoft-365-maintainers ? Or shall we keep the specs as is? |
@mkm17 the idea was that the permissionSet defines the functional set of permissions and the mode dictates whether the granted permissions would be delegated or application.
In this approach, how would we differentiate between application and delegated permissions in the permissionSet @martinlingstuyl? |
We could make that two options as well: --permissionsSetDelegated and --permissionsSetApplication.... But maybe this does not make it clearer after all... |
I think it's too complicated. We can also drop permissions sets for now and start with just delegated and app-only permissions |
In that case: is your suggestion to keep --mode and --permissions? And what values would you expect for permissions? The full resource+scope urls I presume? @waldekmastykarz |
Yes, let's stick with |
Hi, I've paused a bit on this task as I've had some other topics at work. I'll come back to it after Easter. :) |
Hello everyone, I've finally created a pull request (PR) for this task. However, I still have some concerns, so I'm eager to hear your opinions on certain aspects described in the PR comment. More information is available here: #5985 |
Usage
cli app add
Description
Creates custom Azure AD app for use by CLI for Microsoft 365
Options
-m, --mode <mode>
delegated
,appOnly
-p, --permissions [permissions]
permissions
orpermissionSet
but not both--permissionSet
[permissionSet]ReadAll
,SpoFull
,SpoRead
. Usepermissions
orpermissionSet
but not bothAdditional Information
cli config set
#1945, running this command should update the config with the ID of the newly created appdaemon
, the thumbprint, password and expiration date of the generated certThe text was updated successfully, but these errors were encountered: