A cloud-native solution that protects workloads across hybrid and multi-cloud environments with threat detection and security recommendations
Michael Spence Yes, https://api.security.microsoft.com is the official and current base endpoint for Microsoft Defender for Endpoint APIs. The legacy endpoint https://api.securitycenter.windows.com is still functional for backward compatibility, but Microsoft recommends using the new endpoint going forward. At this time, no formal deprecation date has been announced for the legacy endpoint.
Regarding the 403 permission errors, no additional Defender API permissions are required beyond what was previously used. The issue is typically caused by the OAuth token being requested for the old resource audience. When calling the new endpoint, the access token must be obtained using the following scope:
https://api.security.microsoft.com/.default
If the token is still issued for https://api.securitycenter.windows.com, the new endpoint will reject the request with a 403 error, even though the permissions are correctly configured.
The Advanced Hunting API migration to Microsoft Graph only affects Advanced Hunting queries and does not impact standard Defender for Endpoint APIs (alerts, machines, indicators, actions, etc.). Standard Defender API calls continue to work through api.security.microsoft.com.
Summary / Required Action:
- Use
https://api.security.microsoft.comas the base URL - Update the token request scope to
https://api.security.microsoft.com/.default - No permission changes are required
- Advanced Hunting migration to Microsoft Graph is separate and does not affect standard APIs
This should resolve the permission errors when migrating from the legacy endpoint.