Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Microsoft Defender

Connect your Microsoft Defender XDR / Defender for Endpoint tenant to Stoïk so the Stoïk CERT team can monitor and respond on it, as part of the MDR (Managed Detection and Response) offering. Unlike CrowdStrike or SentinelOne, Stoïk does not sell Microsoft Defender licences: the licences remain yours, and you stay in control of your Microsoft tenant.

Your tenant is connected to Stoïk in two ways, and both are required:

  • The Stoïk application (Part A): sends your alerts and the list of protected devices to Stoïk Protect.

  • The Stoïk MDR guest account (Part B): lets the Stoïk CERT team investigate and respond in your Defender portal (device timeline, isolation, live response).

The setup is complete only when Stoïk can see all your protected devices in the Defender portal: see Check the setup and notify Stoïk.

Prerequisites

  • The licence scope is agreed with your Stoïk sales representative, as part of the Stoïk MDR purchase. Stoïk does not purchase Microsoft licences on your behalf.

  • Workstations have Defender for Endpoint Plan 2 (included in Microsoft 365 E5 / A5, and in Defender for Business for SMBs).

  • A Global Administrator account of the tenant that holds your Defender devices. For B.3, a Security Administrator account also works.

Deploy Defender on your devices

Assigning a licence is not the same as deploying the Defender for Endpoint agent. Every device must be onboarded.

  • Workstations: onboard them through Intune, Group Policy, or the local script. See Microsoft's Onboarding devices documentation for the available methods.

  • Servers, one of two options:

    • A Defender for Endpoint server licence: subscribe it first as part of your licence scope, see Prerequisites, then onboard the servers with Microsoft's onboarding package.

    • Microsoft Defender for Servers (Defender for Cloud): in Defender for Cloud > Environment settings > your subscription > Defender plans > Servers > Settings, set Endpoint protection to On. Connect on-premises servers through Azure Arc first. The Azure subscription must belong to the same Microsoft tenant that you connect to Stoïk, otherwise the servers appear in another tenant's console.

  • Windows Server 2012 R2 / 2016: use the modern unified agent. Devices still onboarded through the Microsoft Monitoring Agent (MMA) must be migrated: MMA stops working on 26 February 2027. See Microsoft's migration guide.

Part A: Authorise the Stoïk application

Authorise the Stoïk application in a single click from Stoïk Protect.

  1. Log in to Stoïk Protect with your Stoïk account.

  2. Go to MDR > Settings.

  3. Click Connect your Microsoft account.

  4. You are redirected to Microsoft. Review the permissions requested by the Stoïk MDR application and click Accept.

  5. You are sent back to Stoïk Protect. The Settings page shows the connection as Connected, along with the detected Microsoft Tenant ID. Write it down: it must be the same tenant ID as the one you copy in step B.1. If it differs, you connected another tenant: contact protect@stoik.io before going further.

Part B: Give the Stoïk CERT team access to your Defender portal

Do all four steps, B.1 to B.4, whatever your Defender configuration. Microsoft tenants use different permission models: default, legacy Defender for Endpoint roles, or Defender XDR Unified RBAC (the default for tenants new to Defender for Endpoint since 2025). These steps work in all of them, and a step that is not needed in your tenant does no harm.

B.1: Invite the Stoïk MDR user

1

Go to portal.azure.com (or entra.microsoft.com) with a Global Administrator account.

2

Go to Users > All users, then click Invite external user.

3

Fill in:

  • Email address: mdr_api@stoikcert.onmicrosoft.com

  • Display name: Stoik_Mdr_Api

Copy your tenant ID (displayed at step 3 of the invite form). It must match the tenant ID shown in Stoïk Protect in Part A.

4

Go to the Assignments tab, click Add role, search for and select Security Operator, then click Select.

If the role does not appear in the assignments list afterward, this is a known Microsoft display bug. Refresh the page, the role is usually applied correctly.

5

Click Review + invite, then Invite to finalize.

In your tenant, the guest's user name becomes mdr_api_stoikcert.onmicrosoft.com#EXT#@<your-tenant>.onmicrosoft.com. In the next steps, search for it by its display name Stoik_Mdr_Api, not by its email address.

A Conditional Access policy blocks the invited user

If your tenant has Conditional Access policies in place, they may block the Stoïk MDR guest account. Exclude the Stoik-MDR group, created in B.2, from the blocking policy:

  1. Go to Protection > Conditional Access > Policies.

  2. Click the policy that is blocking access.

  3. Under the Users section, click the Exclude tab, tick Users and groups, then search for and select the Stoik-MDR group.

  4. Click Save.

Your tenant enforces MFA

If your tenant enforces MFA, the Stoïk MDR user will be prompted for it, which the Stoïk CERT team cannot complete. Instead of exempting the account from MFA, set up a cross-tenant trust so the MFA already performed on Stoïk's tenant is accepted by yours:

  1. Go to Identity > External Identities > Cross-tenant access settings.

  2. Under the Organizational settings tab, click Add organization.

  3. Type Stoïk's tenant ID 8100d7bd-172a-492e-bb96-e3f923731bd9 (or stoikcert.onmicrosoft.com), select it, then click Add.

  4. Once the organization appears in the list, click the link under the Inbound access column (typically Inherited from default).

  5. Go to the Trust settings tab.

  6. Select Customize settings.

  7. Tick Trust multi-factor authentication from Microsoft Entra tenants.

  8. Click Save.

B.2: Create the Stoik-MDR group

Defender device groups and legacy Defender roles only accept groups, never individual users. Use this group, not the user, in all the following steps.

  1. In entra.microsoft.com, go to Groups > All groups > New group.

  2. Fill in:

    • Group type: Security

    • Group name: Stoik-MDR

    • Membership type: Assigned

  3. Under Members, click No members selected, add Stoik_Mdr_Api, then click Create.

B.3: Create the Stoïk role in Defender

This step is mandatory, even if you do not know which Defender permission model your tenant uses.

1

Go to security.microsoft.com with a Global Administrator or Security Administrator account.

2

Expand System, click Permissions, then under Microsoft Defender XDR (Unified RBAC), select Roles.

3

Click Create custom role and fill Role Name with stoik_mdr_role.

4

Grant permissions: for each of the three permission groups (Security operations, Security posture, Authorization and settings), select All read and manage permissions, click Apply, then Next.

5

Add the assignment:

  • Click Add assignment.

  • Name: stoik_mdr_assignment.

  • Assign to: the Stoik-MDR group.

  • Select All data sources.

  • Tick Include future data sources automatically.

  • Click Add, then Next.

6

Click Submit to finalize.

7

Still in System > Permissions > Microsoft Defender XDR (Unified RBAC), open Workload settings (or Activate workloads) and check that Microsoft Defender for Endpoint is activated. If it is not, the role above is ignored for devices.

You prefer to keep the legacy Defender for Endpoint roles

Instead of activating the Defender for Endpoint workload in Unified RBAC:

  1. Go to Settings > Endpoints > Permissions > Roles.

  2. Click Add item and name it stoik_mdr_role.

  3. Tick all permissions, including Live response advanced.

  4. In Assigned user groups, add Stoik-MDR.

  5. Click Save.

B.4: Give access to all your device groups

Skip this step only if you have never created a device group. A device group with access restricted to other groups hides all of its devices from Stoïk, including servers.

  1. Go to Settings > Endpoints > Permissions > Device groups.

  2. For each device group, including Ungrouped devices (default): open it, go to the User access tab, add Stoik-MDR, then click Save.

Changes can take a few hours to apply.

Check the setup and notify Stoïk

  1. In security.microsoft.com, go to Assets > Devices and note your number of devices, and of servers (filter OS platform on Windows Server and Linux).

  2. In Entra, go to Enterprise applications > the Stoïk application > Permissions, and check that all permissions show Granted for <your organisation>.

  3. Send an email to protect@stoik.io with your Microsoft Tenant ID and the device and server counts from point 1.

The Stoïk CERT team then logs in with the guest account and validates the onboarding only when it sees Assets > Devices with the same counts. If the menu is missing or the list is empty, see Troubleshooting.

Re-approving the Stoïk application (existing clients)

When Stoïk adds a permission to its application (for example to show your real Defender device list in Stoïk Protect, or to isolate a device), a Global Administrator of your tenant must approve it again: open the link sent by your Stoïk CSM and click Accept.

This only affects the Stoïk application (Part A). It does not change the guest account's access to your Defender portal (Part B).

Troubleshooting

Stoïk sees alerts but no Assets > Devices menu, or an empty device list

Unified RBAC or legacy roles are active and the guest has no Defender role, or a device group restricts access. Complete steps B.2 to B.4: role assigned to Stoik-MDR, Defender for Endpoint workload activated, group added to every device group.

Workstations are visible, servers are missing

The servers are in a restricted device group, the Defender for Servers integration is off, or the Azure subscription is in another tenant. See B.4 for their device group, and the servers section of Deploy Defender on your devices.

The guest account cannot sign in

A Conditional Access policy or an MFA requirement blocks it. See the two dropdowns under B.1.

The guest is not found when assigning the role

A guest's user name contains #EXT#, so searching by email fails. Search for Stoik_Mdr_Api, or assign the Stoik-MDR group.

The tenant ID in Stoïk Protect differs from the Defender console

Part A was approved in another tenant. Contact protect@stoik.io, then redo Part A in the tenant that holds your devices.

The devices in Stoïk Protect differ from Defender

The list in Stoïk Protect still comes from Entra ID, or the application permissions were not re-approved. See Re-approving the Stoïk application in Check the setup and notify Stoïk.

The "Connect your Microsoft account" button in Stoïk Protect returns an error

Make sure you are signed into Microsoft with a Global Administrator account.

The connection shows as "Connected" in Stoïk Protect but no host or alert appears

It can take up to a few hours for the first data sync.

A banner mentions devices running through MMA

Older servers still use the legacy agent, which stops working on 26 February 2027. Migrate them to the unified agent: see Deploy Defender on your devices.

For any unresolved issue or to revoke Stoïk's access to your Microsoft Defender tenant, contact protect@stoik.io.

Last updated