Section 9 - Restrict the Service Principals
SPARK utilizes a System Assigned Managed Identity (SAMI) and a Registered Application to manage SPARK components within Exchange1. The SAMI and Registered Application are represented within Exchange as service principals. They must be restricted in scope.
Requirements
The Exchange Administrator will be required for this step. The user must have:
Exchange Administratorrole- Access to the Microsoft Exchange admin center
Manual Steps:
Video Walkthrough
Step 1: View Enterprise Applications
- Browse and log into Microsoft Entra
Use the correct URL for your environment:
Worldwide (Commercial) & GCC
https://entra.microsoft.comGCC-High and DoD
https://entra.microsoft.us
- Select
Enterprise appsfrom the left menu - Click on
All applicationsunderManage - Click on the
Xfor each default filter
If you do not clear the filters, you may not be able to see the automation account
Step 2: View Automation Account SAMI
- Search for
aa-spark - Click on the
aa-spark-automation0enterprise application
- Annotate the
Application IDandObject IDvalues
Annotate the following variables in the template spreadsheet:
- SAMI appId: The application id of the aa-spark-automation0 enterprise application
- SAMI objID: The object id of the aa-spark-automation0 enterprise application
Step 3: Get App Registration Send Mail Information
- Select
Enterprise appsfrom the left menu - Search for
sendmail - Click on the
appreg-spark-sendmailapplication registration
- Annotate the
Application (client) IDandObject IDvalues
Annotate the following variables in the template spreadsheet:
- v_exo_sendEmailApp: The application id of the appreg-spark-sendmail enterprise application
- SendMail appID: The application id of the appreg-spark-sendmail enterprise application
- SendMail objID: The object id of the appreg-spark-sendmail enterprise application
Step 4: Restrict aa-spark-automation0 SAMI
Restricts the aa-spark-automation0 SAMI to manage the DL-SPARK-SiteOwners distribution lists.
- Reference the 01_Restrict_SAMI_aa_spark_automation0_DL_MGT_v01
- Uncomment the appropriate connection string based on your tenant
- Edit the script and update the following variables listed in the table below
- Run the script
| Name | Value |
|---|---|
| $appID | The application id of the aa-spark-automation0 enterprise application |
| $objID | The object id of the aa-spark-automation0 enterprise application |
These values were retrieved in
Step 2: View Automation Account SAMIabove.
Step 5: Restrict aa-spark-sendmail Enterprise Application
Create the management scope to restrict the SendMail registered app to send only from the SPARK notifications Shared Mailbox (NPE).
- Reference the 02_Restrict_appreg-spark-sendmail.ps1
- Uncomment the appropriate connection string based on your tenant
- Edit the script and update the following variables listed in the table below
- Run the script
| Name | Value |
|---|---|
| $appID | The application id of the appreg-spark-sendmail enterprise application |
| $objID | The object id of the appreg-spark-sendmail enterprise application |
| $domain | Set the domain value for the tenant |
Continue to creating the Storage Account