Microsoft Defender Generated Playbook integration profile not recognized because of API hostname matching

JS 0 Reputation points
2026-11-16T15:21:15.3+00:00

I am working with the Generated Playbook functionality in the Microsoft Defender portal (security.microsoft.com), using the embedded Cline authoring and execution environment.

Problem

A generated playbook requires an API integration, but the playbook integration prerequisite/gate does not recognize the configured integration because of the API hostname it expects.

The integration profile is configured and usable, but during generated-playbook validation/execution Cline reports that the required integration is missing because the API hostname expected by the generated playbook does not match the hostname associated with the integration profile.

Environment

  • Microsoft Defender portal
  • Generated Playbooks / Automation
  • Cline embedded playbook authoring environment
  • Microsoft Entra application registration using client credentials
  • Defender integration profiles
  • API-based playbook execution

Observed behavior

The generated playbook performs an integration prerequisite check before execution. The required API/integration is reported as missing even though the integration profile has been created and configured.

The Azure Support + Troubleshooting diagnostic also identified the likely cause as an integration-profile API-hostname mismatch. It indicated that a Defender XDR integration should use the actual API service base URI rather than the security.microsoft.com portal hostname, and that the API URL of an existing integration profile cannot be changed after creation.

Expected behavior

A correctly configured integration profile should be recognized by the Generated Playbook integration gate when the playbook calls the corresponding API.

Questions

  1. Exactly how does the Microsoft Defender/Sentinel Generated Playbook runtime match a custom_api() request to an integration profile?
  2. Is matching performed strictly against the integration profile's API base URL/hostname?
  3. For Microsoft Defender XDR APIs, what base URL should be used when creating the integration profile?
  4. If an integration was originally created with https://security.microsoft.com rather than the actual API endpoint, is deleting and recreating the integration profile the supported resolution?
  5. Is there a documented limitation or known issue where the Generated Playbook integration gate fails to recognize an otherwise valid integration because of hostname normalization or matching?

This issue relates specifically to Generated Playbooks and integration profiles in the Microsoft Defender portal, not to a generic Azure networking issue.

I originally opened a Microsoft support case through the Microsoft 365/Office support channel. That case was closed with instructions to submit the issue through Azure support or Microsoft Q&A. Azure Support + Troubleshooting correctly recognizes the issue as involving the generated playbook's integration profile/API hostname, but my Azure support entitlement does not expose Microsoft Sentinel as an available technical-support service.I am working with the Generated Playbook functionality in the Microsoft Defender portal (security.microsoft.com), using the embedded Cline authoring and execution environment.

Problem

A generated playbook requires an API integration, but the playbook integration prerequisite/gate does not recognize the configured integration because of the API hostname it expects.

The integration profile is configured and usable, but during generated-playbook validation/execution Cline reports that the required integration is missing because the API hostname expected by the generated playbook does not match the hostname associated with the integration profile.

Environment

  • Microsoft Defender portal
  • Generated Playbooks / Automation
  • Cline embedded playbook authoring environment
  • Microsoft Entra application registration using client credentials
  • Defender integration profiles
  • API-based playbook execution

Observed behavior

The generated playbook performs an integration prerequisite check before execution. The required API/integration is reported as missing even though the integration profile has been created and configured.

The Azure Support + Troubleshooting diagnostic also identified the likely cause as an integration-profile API-hostname mismatch. It indicated that a Defender XDR integration should use the actual API service base URI rather than the security.microsoft.com portal hostname, and that the API URL of an existing integration profile cannot be changed after creation.

Expected behavior

A correctly configured integration profile should be recognized by the Generated Playbook integration gate when the playbook calls the corresponding API.

Questions

  1. Exactly how does the Microsoft Defender/Sentinel Generated Playbook runtime match a custom_api() request to an integration profile?
  2. Is matching performed strictly against the integration profile's API base URL/hostname?
  3. For Microsoft Defender XDR APIs, what base URL should be used when creating the integration profile?
  4. If an integration was originally created with https://security.microsoft.com rather than the actual API endpoint, is deleting and recreating the integration profile the supported resolution?
  5. Is there a documented limitation or known issue where the Generated Playbook integration gate fails to recognize an otherwise valid integration because of hostname normalization or matching?

This issue relates specifically to Generated Playbooks and integration profiles in the Microsoft Defender portal, not to a generic Azure networking issue.

I originally opened a Microsoft support case through the Microsoft 365/Office support channel. That case was closed with instructions to submit the issue through Azure support or Microsoft Q&A. Azure Support + Troubleshooting correctly recognizes the issue as involving the generated playbook's integration profile/API hostname, but my Azure support entitlement does not expose Microsoft Sentinel as an available technical-support service.

Microsoft Security | Microsoft Sentinel
0 comments No comments

1 answer

Sort by: Oldest
  1. AI answer

    2026-11-16T15:22:23.24+00:00

    Create a new integration profile with https://api.security.microsoft.com as its Base API URL, update or regenerate the playbook so its requests use that same API origin, test it, and only then delete the profile created with https://security.microsoft.com.

    Supported correction

    1. In the Microsoft Defender portal, go to Microsoft Sentinel → Configuration → Automation → Integration Profiles.
    2. Select Create and configure a new custom integration profile.
    3. Set Base API URL to:
         https://api.security.microsoft.com
      
      Microsoft documents this as the base URI for the main Defender XDR APIs; for example, an incident request is https://api.security.microsoft.com/api/incidents/{id}.^1^ ^2^
    4. Configure OAuth2 Client Credentials using the existing Entra application, assuming it already has the application permissions required by the called API.
    5. Use the tenant-specific v2 token endpoint and this scope:
         Token endpoint:
         https://login.microsoftonline.com/{TENANT_ID}/oauth2/v2.0/token
      
         Scope:
         https://api.security.microsoft.com/.default
      
      That scope is the documented client-credentials value for a Defender XDR application.^3^
    6. In the embedded editor, make the custom_api() request target the same service origin, with the resource path under /api. Conceptually, the resulting request should resolve to:
         # Illustrative target; retain the generated custom_api signature.
         api_base = "https://api.security.microsoft.com"
         resource_path = "/api/incidents"
      
         request_url = f"{api_base}{resource_path}"
         # custom_api(...) should invoke this Defender API origin,
         # rather than https://security.microsoft.com.
      
    7. Save and exit the editor if it still reports a missing integration, create the new profile, then reopen the playbook. This is Microsoft’s documented workflow when the generator identifies a missing profile.^4^
    8. Regenerate or revise the plan/code, run a test with a nonproduction incident or alert, and confirm that the integration prerequisite is satisfied.
    9. After successful testing, delete the old https://security.microsoft.com profile. Do not delete it first if another playbook might reference it.

    The portal hostname is the interactive Defender portal, whereas api.security.microsoft.com is the Defender XDR API service URI. Moving Defender experiences into the unified portal does not change the existing API endpoints.^5^

    What is documented about matching

    Microsoft documents that an integration profile contains a base URL, authentication method, and credentials, and that the generator uses the configured profile to execute calls for the corresponding service. If the required integration is unavailable, the generator prompts for one.^4^

    However, the public documentation does not specify the internal matching contract for custom_api(). In particular, it does not establish whether matching uses:

    • exact URL equality;
    • scheme plus hostname;
    • normalized hostname and port;
    • longest base-path match;
    • provider identity plus URL; or
    • redirect or hostname-alias handling.

    Therefore, strict hostname matching is consistent with the observed behavior, but it should not be treated as a published runtime guarantee. The supported configuration is to make the profile’s base URL represent the API service actually called, rather than relying on normalization between the portal and API hostnames.

    Profile mutability

    The API URL and authentication method of a custom integration profile cannot be changed after creation; only its name and description can be edited. Microsoft explicitly directs users to create a new integration when the URL must change and then delete the old integration.^4^ This limitation is also listed in the current integration-profile limitations.^6^

    Accordingly, recreating the profile is the supported correction here; editing the existing profile’s URL is not available.

    Known-issue status and escalation

    No published limitation or known-issue entry in the relevant documentation identifies a custom_api() hostname-normalization defect involving security.microsoft.com. The documented limitations mention immutable API URLs and authentication methods, but not hostname aliases or normalization failures.^6^

    If the newly created profile still is not recognized while both the profile and generated request visibly use https://api.security.microsoft.com, the remaining behavior requires product-side investigation. Capture:

    • the profile’s base URL, excluding credentials;
    • the complete target URL generated for custom_api();
    • the missing-integration message and timestamp;
    • playbook name and execution/test correlation details;
    • tenant region and whether a regional API hostname is involved;
    • a browser HAR trace from reproduction, with tokens and secrets removed.

    Open the request against Microsoft Defender XDR / Microsoft Sentinel in the Defender portal, emphasizing Generated Playbooks / Playbook Generator / integration profiles, rather than Azure networking. This automation experience is currently documented as preview, so capabilities can change during the preview period.^6^


    References

    1. Supported Microsoft Defender XDR APIs
    2. Get incident information API
    3. Create an app to access Microsoft Defender XDR without a user
    4. Generate playbooks using AI in Microsoft Sentinel
    5. Overview of Microsoft Defender XDR APIs
    6. Automation with ISOC in Microsoft Defender (preview)
    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.