-
Notifications
You must be signed in to change notification settings - Fork 215
IG: add parameter sets to construct assignment requests #627
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
Conversation
...nce/Identity.Governance/custom/New-MgEntitlementManagementAccessPackageAssignmentRequest.ps1
Outdated
Show resolved
Hide resolved
peombwa
left a comment
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.
![]()
|
Interesting -- so @markwahl-msft, @peombwa we could generalize this as a customization approach: if there is an existing command that is functionally correct in that it maps to a single API, we can create a PowerShell-based wrapper. One key question here: is this purely additive, or does it break the existing interface of the command? @peombwa , is there any reason we can't add pipelining this way? I think this should be feasible. |
|
Also, @markwahl-msft do you plan on making this the default parameterset? And the docs must be provided via the comments of the PowerShell function? |
|
@adamedx Yes this is intended to be the default parameter set.
I had tried setting the synopsis and description in the top of the cmdlet ps1 file, but in get-help ... -detailed I'm not seeing the values set there. Ideally I'd like the help to be able to automatically incorporate content that's already been written in articles such as https://docs.microsoft.com/graph/api/accesspackageassignmentrequest-post for each of the cmdlets that corresponds to a single Graph API call, since those articles already have comprehensive descriptions, examples etc. |
|
@adamedx This is purely additive and does not break existing parameterSets of the same command.
We would have to apply a wrapper for all generated commands to support pipeline this way. AutoREST has its own piping mechanism which uses an |
In the Azure AD Identity.Governance module, this customization adds two parameter sets to New-MgEntitlementManagementAccessPackageAssignmentRequest, to simplify creating an Entitlement Management access package assignment request to administratively add or remove access.
For example, if an admin has the ID of an access package in $apid and the ID of a user in $tid, and the AP has a single policy for admin assignment, then to assign the user to that access package with that policy,