Hello @Personal CAD SINGAMR3 N
You can either use Microsoft Graph PowerShell as detailed below to set "notificationEmailAddresses" for Enterprise application SAML Signing Certificate.
Detailed steps:
- Sign-in:
Use the Connect-MgGraph command to sign in with the required scopes. Example:Connect-MgGraph -Scopes "Directory.AccessAsUser.All Directory.Read.All Directory.ReadWrite.All"
- Call Microsoft Graph:
Use theGet-MgServicePrincipal
command to get a list of enterprise application'sNotificationEmailAddresses
, and then create a custom script using your own logic to change email addresses based on conditions in the loop section using 'if' or 'foreach' conditions. - Here are a few examples for your reference:
List all Enterprise applications with NotificationEmailAddresses
:
Get-MgServicePrincipal -All |select Id, DisplayName, NotificationEmailAddresses
To update NotificationEmailAddresses
on a Single Enterprise Application:
Update-MgServicePrincipal -ServicePrincipalId 25dbe63f-2356-4dca-9911-5eb3e8e966e9 -NotificationEmailAddresses ******@contoso.onmicrosoft.com
To update new NotificationEmailAddresses
on all Enterprise applications
Get-MgServicePrincipal -all |% {Update-MgServicePrincipal -ServicePrincipalId $_.id -NotificationEmailAddresses ******@contoso.onmicrosoft.com}
(Note: The cmdlet above replaces all current email addresses for all applications.)
I hope this helps.
----------
Please "Accept the answer" if the information helped you. This will help us and others in the community as well.