We would get the below error while using Approvals in Power Automate
“BadRequest. The request failed. Error code: ‘InvalidApprovalCreateRequestAssignedToNoValidUsers’. Error Message: ‘Required field ‘assignedTo’ contained no valid users in the organization'”
This error occurs if we are trying to send the approval to the user which doesn’t exist in the organization or to the external users.
We recently got this error, and interestingly in our case, the user was showing up in the members in the Security Group inside Azure Admin Portal and was also giving us the option to add the user in Assigned To in the Flow.
However the user was not there in the Address Book of the Outlook, that is when we realized that user does not exist in the tenant anymore.
The flow can also fail if Assigned to a user’s personal account.
Here we have an option, to add the user as the Guest User.
Within Admin portal, navigate to Users >> Guest Users
Invite the user
The guest user needs to accept the invitation.
Back in our approval flow, we can now select the guest user added.
We can see the guest user getting the approval request
If we are using Security Group for the CRM Environment, than the user needs to be added to the Security Group also, else we will get the below exception – UserNotMemberofCdsSecurityGroup – The user cannot be created in Microsoft Dataverse because the account is not the member of the security group.
Fixed – Error code: ‘UserNotMemberOfCdsSecurityGroup’. Error Message: ‘The user ‘xyz’ cannot be created in Microsoft Dataverse because the account is not a member of group ‘abc’
In case we want to use approval with an external user(s) – without adding them as a guest user, we can use Send Email with Options Action instead of Power Automate Approvals.
Hope it helps..