Error when user is not member of Azure group

Not sure if this is intended but when using Azure Admin plugin to remove a user from a group that a user is not in the plugin will through an error instead of just returning a bool of false which I think would be the desired result. I get this error. (It works fine if the user is in the group) For some context I am using this in flow for offboarding users. Most of the time the expectation would be that the user is in the group but in the instances they are not getting an error is not desirable.

Delete User from Group call returned an unexpected response: 404 Check that the group name insight_connect_test and user id xxxxxxxxxxxxxxxxxxxxxxxxxxxxx are correct. Response was: {
“error”: {
“code”: “Request_ResourceNotFound”,
“message”: “Resource ‘xxxxxxxxxxxxxxxxxxxxxxxxxxxxx’ does not exist or one of its queried reference-property objects are not present.”,
“innerError”: {
“date”: “2021-01-22T01:05:26”,
“request-id”:
“client-request-id”:
}
}
}
Traceback (most recent call last):
File “/usr/local/lib/python3.7/site-packages/komand-1.0.1-py3.7.egg/komand/plugin.py”, line 311, in handle_step
output = self.start_step(input_message[‘body’], ‘action’, logger, log_stream, is_test, is_debug)
File “/usr/local/lib/python3.7/site-packages/komand-1.0.1-py3.7.egg/komand/plugin.py”, line 419, in start_step
output = func(params)
File “/usr/local/lib/python3.7/site-packages/azure_ad_admin_rapid7_plugin-2.2.4-py3.7.egg/icon_azure_ad_admin/actions/remove_user_from_group/action.py”, line 39, in run
data=result.text)
komand.exceptions.PluginException: An error occurred during plugin execution!

Delete User from Group call returned an unexpected response: 404 Check that the group name insight_connect_test and user id 078c0469-8f3c-4769-8b0c-a3484fb88671 are correct. Response was: {
“error”: {
“code”: “Request_ResourceNotFound”,
“message”: “Resource ‘xxxxxxxxxxxxxxxxxxxxxxxxxxxxx’ does not exist or one of its queried reference-property objects are not present.”,
“innerError”: {
“date”: “2021-01-22T01:05:26”,
“request-id”: “xxxxxxxxxxxxxxxxxxxxxxxxxxxxx”,
“client-request-id”: xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}
}
}

That’s intended behavior, but we’re talking about it internally.

To get around this, when you configure the step, you can choose “continue on step failure.” Which will continue your workflow in the case that the user you’re trying to delete doesn’t exist.

Just to complete my answer. You can check the “$success” variable for that step later to make sure the plugin completed that step successfully.