Home

Awesome

AdminSubmissionsAPI scripts for URL and mail submission.

Admin Submission API allows submission of URLs, mail messages, file mail messages and files to Microsoft to re-scan and get newest verdict on submitted entity. Admin Submissions API is available both to Exchange Online Protection customers as well as to Office 365 ATP customers. The repo provides two PowerShell scripts:

  1. for URLs submission: AdminSubmissionAPI.ps1
  2. for email and emails from the attachment: Email_AdminSubmissionAPI.ps1 Both scripts provide read of re-scan result capability. The pre-requisites and preparation steps for URL and email submissions scripts related to the Azure AD app registration are the same and are described below,

Pre-requisites

Deployment

Azure AD app registration

  1. Navigate to the Azure AD admin portal
  2. Click “New registration” App registration
  3. Enter name of your app for example "Threat Assessment". Leave “Accounts in this organizational directory only” option selected
  4. Select “public client/native” and click "Register"
  5. Click “API permissions” from left navigation menu.
  6. Click “Add a permission”. Click: "Microsoft Graph" API permissions
  7. Click "Delegated permissions". Scroll down through the list of permission. Select "ThreatAssessment.ReadWrite.All". Click “Add permissions”.

Permissions

Note that email submission script will also need following Graph API permissions: Mail.Read and Mail.Read.Shared

  1. Refresh the list of permissions. Click “Grant admin consent for <your organization’s name>”. Click Yes. GrantConsent
  2. Next click on “Authentication” from left navigation menu. Configure Redirect URIs for Mobile and desktop applications as shown on the screenshot below by adding following ones:

Authentication 10. On the App screen click “Overview” and copy “Application (client) ID” to the script code into the $clientID variable. AppID 11. Next, we need to assign user allowed to use this app. Assign user(s) to the app by following instruction from this article Adding user 12. Next in the Enterprise Application window, navigate to “Properties”. Select Yes next to “User assignment required” and click “Save” User assignment

Script operation instructions

After pre-requisites and deployment steps are fullfiled please read below manuals on how to execute the scripts: