Hi,
I'm trying to fetch a list of security alerts using the Microsoft Graph API List Alerts.
I have granted the necessary API permissions with Admin consent, but I'm still encountering an error:
Unauthorized request - Account is not provisioned.
Interestingly, I can successfully fetch the Delegated Admin Relationship list using the same client and secret, but I'm only facing issues with Security Alerts. I'm using Postman to validate the API call, and below is the curl command I'm using to get the access token:
curl --location 'https://login.microsoftonline.com/{tenant-id}/oauth2/v2.0/token' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'client_id={client-id}' \
--data-urlencode 'scope=https://graph.microsoft.com/.default' \
--data-urlencode 'client_secret={secret}' \
--data-urlencode 'grant_type=client_credentials'
Has anyone else faced this issue or have any suggestions on how to resolve it?