Skip to main content
When shared mailboxes are being used, xorlab needs to know, which mailboxes to include for which Self-Service Quarantine users. This can be accomplished by setting an attribute in Entra ID, which is read by xorlab via the SAML integration. For on-premises setups the process will differ.

Pre-requisites

  • Global Administrator Role on Entra ID Performing the following operations will require administrator privilege on your Microsoft Entra ID and Exchange Admin portal.
  • xorlab Entra ID Application Ensure that an xorlab enterprise application and application registration has been created, which should have been done during the Create Entra ID App.
  • Postman or access to Graph Explorer To create the extension property, necessary to store the shared mailboxes, you will need the Postman software with an account (free) or an access to the Graph Explorer.
    Using API tools with admin credentialsIt is strongly recommended that sensitive credentials are stored only locally and not uploaded to cloud accounts, such as Postman.

Configure your xorlab App Registration

Open the Azure Portal, search for the xorlab App Registration created during the Create Entra ID App.
  1. From the left hand sidebar navigate to Manage → Certificates & secrets → Client Secrets and create a temporary client secret. You will need it later for creating a custom extension property.
  2. Create a PKCS#12 certificate (.pfx) by following the official Microsoft guide below. As a result, you should have two certificate files: .cer and .pfx. Make sure to take note of the certificate password.
    Certificate creation on WindowsFollow the steps from Create a self-signed public certificate to authenticate your application including the optional “Export your public certificate with its private key” section.
  3. Upload the public certificate .cer into Certificates in App Registration section.
  4. Once the certificate is uploaded, navigate to the API permissions, and add the following application permissions:
    API permissions
  5. Make sure that the permissions are granted admin consent (Grant admin consent for …).
  6. Assign the Exchange Administrator role to the xorlab App Registration:
    1. Navigate to Microsoft Entra ID → Roles and administrators.
    2. Search for the Exchange Administrator administrative role in the search bar and open it.
    3. Use the Add assignments button.
    Exchange Administrator Role

Create the custom extension property

To create this property, you will have to use the Graph API. We prepared a Postman collection containing the requests needed: postman_collection.json.
In case you can’t download PostmanIn case you can’t have access to Postman, you can also use the Graph Explorer. Make sure to have the necessary Application rights and run a POST query on this endpoint: https://graph.microsoft.com/v1.0/applications/**REPLACE WITH OBJECT ID**/extensionPropertiesIn the body section, you will have to insert this:
  1. Import the collection into your Postman software.
  2. In the Collection > Variables section, ensure that you are not syncing or sharing any sensitive variables — especially GraphAPIToken and clientSecret. The recommended approach is to store the token and any secrets as a secret variable in your local Postman Vault and reference it directly using {{vault:secret-name}} in your requests. This ensures the token remains secure and is not accidentally uploaded or shared.
  3. In Get a token request, replace the different variables and use the request to get a token from Graph API.
  4. In Create custom property, replace GraphAPIToken variable with the token returned by the previous request. You should now be able to run the Create custom property request, as a response you will get the property name, it should be: extension_**clientID**_xorlab.

Run and automate the script in Azure Automation

Azure provides the possibility to run PowerShell scripts directly in their system for a cheap price. We recommend using this option which save resources and implementation time. You will first need to create an Automation Account, you can do so by searching for Automation Account in the Azure Portal.
During the creation, make sure the Managed Identities are System Assigned and that the networking is Public Access
After the creation of the Automation Account, you have to activate Try Runtime Environment Experience by clicking the according button. Then, navigate into Runtime environment and create a new PowerShell 7.2 environment. In this new runtime environment, add the following modules from the PowerShell Gallery:
Go back to your Automation Account and navigate in Certificates, here you will have to upload the .pfx certificate file created previously. The name of the certificate must be ‘cert’. You will be asked to enter the password of the certificate and select Exportable as Yes.
Wrong passwordIf Azure tells you that the password is incorrect, it can be due to a wrong certificate created. Double check that it is PKCS#12 compliant.
Once this is done, you will need to navigate to Variables and create some of them, based on the data you saved before: Navigate to Runbooks and create a new runbook. Then, import the shared mailboxes script. Make sure your runbook is using your custom Runtime Environment previously created. Try to run your runbook, the final output should let you know some of the mailboxes updated. There shouldn’t be any errors. If you’re happy with the result, publish the runbook and schedule it on a regular basis (e.g each night) via the Schedules functionality.

Use the new extension property in xorlab

  1. In the Azure portal, search for the xorlab Enterprise Application
  2. Navigate to Single Sign On
  3. Edit Attributes & Claims
  4. Add a new claim named xorlabAddresses (Namespace can be left empty)
  5. Select Directory Schema Extension and find your xorlab App Registration
  6. Select it and find the user.xorlab attribute
  7. Save the changes and open your xorlab instance
  8. In the Expert Editor, open the auth.yml file and search for your SAML configuration
  9. Set the emails: property to
  10. Click Publish. The authentication configuration becomes active within about one minute.

Maintenance Task – Updating an Expired Certificate

Depending on the parameters used in the Configure your xorlab App Registration, the certificate (both .pfx and .cer files) may expire after some time. When this happens, you’ll need to renew the certificate and upload the updated files to both App Registration and Azure Automation.

Steps to Renew the Certificate

App Registration

Azure Automation

  • Go to your Automation Account>Shared Resources.
  • Navigate to Certificates.
  • Remove the existing certificate named cert.
  • Upload the newly created .pfx certificate file.
    • Ensure the certificate name is exactly cert.
    • Enter the certificate password.
    • Set Exportable to Yes.
Once these steps are completed, your automation should resume functioning correctly.