How to manage EntraID - Enterprise application - consent and permissions - Admin consent settings via PS?

Oleg Tserkovnyuk 586 Reputation points
2024-05-24T13:04:02.77+00:00

Hello,

I am looking for a way to manage EntraID - Enterpise application - consent and permissions - Admin consent settings via PS.

I tried two options:

And via Graph:

Both options change value in PS, but when I check from UI the setting remains disabled.

Probably, this happens because it requires at least one approver to be selected. I did not find a way to select an approver from the PS.

Is there any way to manage this setting using PS?

Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
20,094 questions
{count} votes

Accepted answer
  1. Navya 5,405 Reputation points Microsoft Vendor
    2024-05-27T15:43:35.61+00:00

    @Oleg Tserkovnyuk

    Thank you for posting this in Microsoft Q&A.

    I understand that you are looking for a way to manage EntraID - Enterprise application - consent and permissions - Admin consent settings via PowerShell.

    User's image

    Yes, it is possible to manage the EntraID - Enterprise application - consent and permissions - Admin consent settings via PowerShell.

    Update-MgPolicyAdminConsentRequestPolicy it updates the properties of an adminConsentRequestPolicy.

    For your reference: https://learn.microsoft.com/en-us/powershell/module/microsoft.graph.identity.signins/update-mgpolicyadminconsentrequestpolicy?view=graph-powershell-1.0

    We can manage Admin consent settings via Graph API : https://learn.microsoft.com/en-us/graph/api/adminconsentrequestpolicy-update?view=graph-rest-1.0&tabs=http

    Hope this helps. Do let us know if you any further queries.

    Thanks,

    Navya.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful