Forum Discussion
"Authorization failed" error for Logic app writing a comment to Sentinel Incident
Please try at the following:
- Verify Role Assignments
Even though the managed identity has the Microsoft Sentinel Responder and Microsoft Sentinel Automation Contributor roles, double-check the scope of these assignments:
- Ensure the roles are assigned at the correct level (e.g., subscription, resource group, or workspace).
- Confirm that the roles cover the specific Sentinel workspace where the logic app is trying to write comments.
- Check Permissions for Specific Actions
The error message suggests that the managed identity might lack permission for the specific action Microsoft.SecurityInsights/incidents/comments/write. Verify that the roles assigned to the managed identity include this action. If not, you may need to create a custom role with the required permissions.
- Refresh Credentials
Sometimes, newly assigned roles take time to propagate. Try refreshing the credentials for the managed identity:
- Reauthenticate the connection in the logic app.
- Restart the logic app to ensure it picks up the updated permissions.
- Compare Logic App Configurations
Since the other logic app works fine with the same managed identity, compare the configurations of both logic apps:
- Check for differences in the API connections or triggers.
- Ensure that the failing logic app is using the correct connection tied to the managed identity.
- Debugging the Logic App
Enable diagnostics and logging for the failing logic app to gather more details about the error:
- Use the Run History in the Azure portal to inspect the failed action and view the detailed error message.
- Check the Workflow Definition to ensure the logic app is correctly configured to use the managed identity.
- Test with Elevated Permissions
As a temporary measure, assign the Contributor role to the managed identity to test if the issue is related to insufficient permissions. If this resolves the error, you can narrow down the missing permissions and create a custom role.