A cloud-native SIEM solution that provides intelligent security analytics and threat detection across systems
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
- In the Microsoft Defender portal, go to Microsoft Sentinel → Configuration → Automation → Integration Profiles.
- Select Create and configure a new custom integration profile.
- Set Base API URL to:
Microsoft documents this as the base URI for the main Defender XDR APIs; for example, an incident request ishttps://api.security.microsoft.comhttps://api.security.microsoft.com/api/incidents/{id}.^1^ ^2^ - Configure OAuth2 Client Credentials using the existing Entra application, assuming it already has the application permissions required by the called API.
- Use the tenant-specific v2 token endpoint and this scope:
That scope is the documented client-credentials value for a Defender XDR application.^3^Token endpoint: https://login.microsoftonline.com/{TENANT_ID}/oauth2/v2.0/token Scope: https://api.security.microsoft.com/.default - 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. - 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^
- Regenerate or revise the plan/code, run a test with a nonproduction incident or alert, and confirm that the integration prerequisite is satisfied.
- After successful testing, delete the old
https://security.microsoft.comprofile. 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