Forum Discussion

canix1's avatar
canix1
Copper Contributor
Oct 27, 2020

How do I set alert setting on PIM Azure AD roles using PowerShell or Graph API

My plan is to export and import settings for AAD Roles in bulk with PowerShell.
I'm trying to set "Role assignment alert" with PowerShell for aadRoles in PIM but the command Set-AzureADMSPrivilegedRoleSetting does not have options for alerts.
How can I configure the alert settings of privileged roles using PowerShell or Graph?
The reference here gives me an error:
The current endpoints of AAD roles have been disabled for the tenant for migration purpose. Please use the new Azure AD RBAC roles. Please refer to https://aka.ms/PIMFeatureUpdateDoc for new PIM features; https://aka.ms/PIMAPIUpdateDoc for API and PowerShell changes because of migration.",

https://docs.microsoft.com/en-us/graph/api/resources/privilegedoperationevent?view=graph-rest-beta

  • Raf Cox's avatar
    Raf Cox
    Copper Contributor

    Hi canix1 ,

     

    I'm hitting the same problem ... You can export or create with PS all role-settings, except everything under the "notifications" section of the role-settings ...

    Did you manage to solve this?

    thanks!

    Raf

    • canix1's avatar
      canix1
      Copper Contributor

      Hi Raf Cox 

       

      No, I'm still stuck but have not done any research for a while.

       

      Cheers

       

      • akumarnc's avatar
        akumarnc
        Copper Contributor

        Hi canix1 

        Not sure if you managed to resolve this. Is it possible to update notification setting using Set-AzureADMSPrivilegedRoleSetting? Thank you.

         

         

Resources