Forum Discussion
Unable to Retrieve Exposure Score & Vulnerability Score from Microsoft Defender API
- 1 year ago
Hi burakkaragoz ,
Thanks for reaching out to the Microsoft fabric community forum.
In this Forum you will find people who are good at Power BI and Fabric, as the root cause of the issue is related to Microsoft defender, for issues related to it, please raise a question in Azure Community Azure Community Support | Microsoft Azure for best possible help.
In the meantime for any other issues related to Fabric please don’t hesitate to raise a post in this forum.
If this post helps, then please consider Accepting as solution to help the other members find it more quickly and consider giving a KUDOS. Feel free to reach out if you need further assistance.
Thank you
Hi Nandhana___nk ,
This is a common situation when working with Microsoft Defender for Endpoint API and Power BI. Here are a few things you can try:
1. Check the API permissions in Azure AD:
- Go to Azure AD > App registrations > Your App > API permissions.
- Click "Add a permission" and select Microsoft Threat Protection (not just Defender for Endpoint).
- Search for and add the following permissions if available:
- Vulnerability.Read.All
- Exposure.Read.All
- If these are not visible, make sure you are searching under the correct API. Sometimes permissions are found under "Microsoft Threat Protection" instead of "Microsoft Defender for Endpoint".
2. Grant Admin Consent:
- After adding permissions, an Azure AD admin needs to grant consent.
- Without admin consent, the permissions will not be active for your app.
3. Licensing requirements:
- The Exposure Score and Vulnerability Score APIs may only be available if your tenant has the Microsoft Defender Vulnerability Management add-on.
- Check your subscription to make sure this feature is enabled.
4. API token scope:
- When requesting your Azure AD token, use this scope:
https://api.security.microsoft.com/.default
Helpful links:
Summary:
- Double check that you’re assigning the right permissions under the right API.
- Make sure admin consent is granted.
- Confirm your Defender license covers Vulnerability Management.
- Use the correct token scope for your requests.
If you’ve tried all the above and still have issues, sometimes it helps to remove and re-add the permissions, or wait a few minutes for changes to propagate.
Hope this helps! If you resolve it, please update the thread so others can benefit.
translation and formatting supported by AI