Skip to content
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

Remove -AuthorizationPolicyId which doesn't exist (anymore?) #940

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

cnotin
Copy link
Contributor

@cnotin cnotin commented Jun 14, 2024

This parameter doesn't exist. At least in the latest v1.0 version of the Graph PowerShell module. Perhaps it used to exist?
Proof in doc: https://learn.microsoft.com/en-us/powershell/module/microsoft.graph.identity.signins/update-mgpolicyauthorizationpolicy?view=graph-powershell-1.0
And in this error:

PS> Update-MgPolicyAuthorizationPolicy -AuthorizationPolicyId $authorization_policy -BodyParameter $body
Update-MgPolicyAuthorizationPolicy : A parameter cannot be found that matches parameter name 'AuthorizationPolicyId'.

PS> Get-InstalledModule Microsoft.Graph

Version              Name                                Repository           Description
-------              ----                                ----------           -----------
2.19.0               Microsoft.Graph                     PSGallery            Microsoft Graph PowerShell module

Edit: Actually! It exists, but only for the beta version!
https://learn.microsoft.com/en-us/powershell/module/Microsoft.Graph.Beta.Identity.SignIns/Update-MgBetaPolicyAuthorizationPolicy?view=graph-powershell-beta

There are significant differences between the v1.0 and beta versions of this API (returning an object vs. array, authorization policy under defaultUserRolePermissions.permissionGrantPoliciesAssigned vs. permissionGrantPolicyIdsAssignedToDefaultUserRole)

Currently all the content in the page refers to the beta version of the API and the commands. My advice is to either adapt it to v1.0, or keep beta but make it very explicit and use instead Update-MgBetaPolicyAuthorizationPolicy

Copy link
Contributor

@cnotin : Thanks for your contribution! The author(s) have been notified to review your proposed change.

Copy link
Contributor

Learn Build status updates of commit b98b548:

✅ Validation status: passed

File Status Preview URL Details
docs/identity/enterprise-apps/configure-user-consent.md ✅Succeeded

For more details, please refer to the build report.

For any questions, please:

@Court72
Copy link
Contributor

Court72 commented Jun 14, 2024

@omondiatieno

Can you review the proposed changes?

Important: When the changes are ready for publication, adding a #sign-off comment is the best way to signal that the PR is ready for the review team to merge.

#label:"aq-pr-triaged"
@MicrosoftDocs/public-repo-pr-review-team

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants