May 13 2022 02:36 AM
Hello,
I have personal account and I am trying Microsoft Sentinel. My senario is when user account (not admin) changes his authentication method, an alert is triggered and then I run built-in playbook Block-AADUser-Alert to disable this account. I get following error when running this playbook:
{
"error": {
"code": "Request_ResourceNotFound",
"message": "Resource '[\"leloc@hoahung353.onmicrosoft.com\"]' does not exist or one of its queried reference-property objects are not present.",
"innerError": {
"date": "2022-05-13T03:06:46",
"request-id": "84bab933-eb79-4352-9bdf-e6d5444a1798",
"client-request-id": "84bab933-eb79-4352-9bdf-e6d5444a1798"
}
}
}
I have tried to assign all required permissions (User.Read.All, User.ReadWrite.All, Directory.Read.All, Directory.ReadWrite.All), authorized api connection,.. but it can not solve the issue.
Would anyone help advise how to solve ? Is it because of personal account ?
Best Regards,
An
May 13 2022 03:42 AM
May 13 2022 07:41 AM
May 13 2022 09:04 AM
May 14 2022 12:46 AM
May 14 2022 01:20 AM
May 14 2022 01:42 AM
The playbook run succeeded, but the workflow get error at the operation that disable user:
Best Regards,
An
May 14 2022 02:09 AM
May 14 2022 02:31 AM
May 14 2022 02:32 AM
@mikhailf Yes I tried graph explorer and when I use method GET then it works, but when I use method PATCH with request body { accountEnabled: false} as in the playbook, then I get not insufficient privilege although I have assigned all required permissions:
Regards,
An
May 14 2022 02:43 AM
@mikhailf I go to Azure AD -> Enterprise Application -> Azure Logic App -> permission, I found following permissions. I don't know how to assign more permissions, and I guess User.ReadWrite.All, Directory.ReadWrite.All cover User.Read.All, Directory.Read.All:
Best Regards,
An
May 14 2022 03:18 AM
May 14 2022 03:21 AM
@mikhailf I did that but it does not help.
May 14 2022 07:53 AM
SolutionMay 14 2022 06:20 PM
@mikhailf There are 2 api for the "Update user" and I authroized both of them:
Regarding the support table from the link you mentioned, I don't see Azure AD there, There is Azure AD IP which is different from Azure AD, I guess. I have tried Incident instead of alert but I still get the same error
Best Regards,
An
May 14 2022 06:22 PM
May 15 2022 11:46 PM
I know the reason why - there is no attribute "accountEnabled" . If we use GET then we can see all attributes returned for this call and there is no "accountEnabled". I try other attribute like "mobiPhone", "mail", "officeLocation" and it works !@mikhailf
May 15 2022 11:52 PM
May 16 2022 12:07 AM - edited May 16 2022 01:05 AM
But I don't think that this is the reason. The playbook below works well and I can disable users using it. (Only two parts Sentinel Alert and Update User).
May 16 2022 02:19 AM
One more thing. You don't need to provide Azure Logic Apps - Azure AD with any permissions.
What is the user that connects "Update user" part with AzureAD?
Does it have permission to disable other accounts?