How to – Hide Approve / Reject Button in Approval Email in Power Automate Approval Workflow


Recently we had a requirement to remove or hide the Approve and Reject buttons from the approval email as we wanted the user to manage it all from the Approval Center.

The way we implemented this is by replacing the Start and wait for an approval action with Create an approval, Send email notification and Wait for an approval action.

For Create an approval action, set Enable notifications as No this makes sure no email is sent.

Followed by– in the body, specify Send an email notification the Approval Center link.

Followed by Wait for an approval, specify the Approval ID there.

And the Condition control and the required logic.

After running the flow, the user will get the email and can click the link to navigate to the Approval center.

The user can then take the required action from within the Approval center.

The flow will wait for the user

Also, check – Implementing approvals with Teams notifications

https://powergi.net/2021/07/11/use-power-automate-approvals-with-teams-notifications-only-no-emails/

Check other articles on Power Automate Approvals 

Approvals – Power Automate & Dynamics 365

Hope it helps..

Advertisements

Approval / When a file is created (properties only) – when a file is added to the folder in the SharePoint library


Recently we had a requirement to implement an approval workflow when a document is added to a SharePoint library.

Below is how we can implement it.

Details –

Trigger – When a file is created (properties only)

Specify the Site Address, Library Name, and the Folder on which the flow should run.

Initialize Variable

Initialize a variable VarComments to save all the responses.

Start and wait for an approval

Here we have used the Approval type as Custom Response – Wait for one response, we could also Approve / Reject – First to respond or any approval type based on the requirements.

The Assigned to field contains the name of the user who needs to review it.

The item link contains the link to the item.

Enable reassignment as Yes will allow the approver to reassign the approval to another user from the Approval Center.

Apply to each

Append the approval response to the variable VarComments.

Condition

If Outcome is Approved

If Yes – Update File Properties

Update the properties of the file using the ID.

Update the Approval Comments property with the variable.

Update the status value as Approved.

Repeat the same step for any other Outcome.

Check other blog posts on Approvals – https://nishantrana.me/2020/08/31/approvals-power-automate-dynamics-365/

Also check –https://manueltgomes.com/reference/power-automate-trigger-reference/when-a-file-is-created-properties-only-trigger/

Hope it helps..

Advertisements

Assign approvals to any user in the Tenant – Power Automate


We recently implemented Approvals, and we required that any user in the tenant should be able to provide approval.

For one of the users, we got the below error while testing the flow.

UserNotMemberOfCdsSecurityGroup

This was because we were using the Security Group to control access to Dataverse Environment.

So adding the user to the Security Group fixed the issue for us.

The user had the required CRM /Dataverse license.

More on that – 

https://nishantrana.me/2021/11/01/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/

Next, we ran into an another issue with one more user’s account and got the below error.

InvalidApprovalCreateRequestAssignedToNoValidUsers

The user was unlicensed so we thought that could be the issue. However, for other unlicensed users it was working fine, on running the flow, the user was getting added to CRM with Approvals User security role.

https://docs.microsoft.com/en-us/power-automate/get-started-approvals#assign-approvals-to-any-user-in-your-tenant

Next, we checked the AllowAdHocSubcriptions setting in Azure AD.

We tried both enabling and disabling this setting, but it still worked for other unlicensed users except the particular user.

We had added the user’s account to the Security Group also.

After spending some more time, when we tried to search for that user’s account in Outlook Address Book, it didn’t give us any result, then we realized that the account doesn’t exist anymore in the Tenant.

https://nishantrana.me/2021/11/03/fixed-invalidapprovalcreaterequestassignedtonovalidusers-error-message-required-field-assignedto-contained-no-valid-users-in-the-organization/

Hope this helps..

Advertisements

Fixed – ‘InvalidApprovalCreateRequestAssignedToNoValidUsers’. Error Message: ‘Required field ‘assignedTo’ contained no valid users in the organization’.


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.

https://debajmecrm.com/approvals-with-external-users-in-power-automate-without-consuming-power-automate-flow-license/

Hope it helps..

Advertisements

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’


We would get this error within Power Automate Approval Flow if we are using Security Group to control access to Dynamics 365 Environment and are sending Approval to a user who is not a member of that security group.

Below is the User within the Tenant but is not member of the My CRM Group Security Group associated with that Environment.

The Security Group – My CRM Group – assigned to Environment against which flow  is created.

So to fix the issue, as the error message indicates, we need to add the user to the Security group.

After adding the user to the Security Group, the flow runs successfully

Also, the User (unlicensed in our case) gets added to CRM with Approvals
User security role as shown below.

Check other posts on Approvals – 

Approvals – Power Automate & Dynamics 365

Hope it helps..

 

Advertisements

Approvals in Microsoft Teams / Power Automate


Approvals App for Teams was introduced early this year. To see it in action, let us start by first adding the Approval app in Teams.

Search for the app.

And click on Add.

The Approval app shows all the Approvals Received and Sent within teams, which can be filtered based on status.

We can also select the environment.

We can create a new approval request by clicking on New approval request

For the new Approval request, we can define –

  • Request Type – Basic or eSign (requires Adobe Sign)
  • Name of the Request.
  • Approvers – could be one or more. For more than one approver, we can select Require responses from all the users.
  • Additional Details.

We can add attachments.

It seems we can only add only one attachment.

Custom responses allow us to add our custom responses.

We can add 2 custom responses with a limit of 20 characters as shown below.

Send to another environment, lets us choose another environment within that tenant.

Now say we have below flow created that sends approval when a case is updated.

On getting triggered, the approver (assigned to) user will receive notification in Teams.

And in the team’s Feed as well as the Approvals app.

The approver can open the request and can take appropriate action.

On Submitting the response, say e.g. Approve, notifications are received again with the updated status of the request as shown below.

Check more posts on Approvals in Power Automate

https://nishantrana.me/2020/08/31/approvals-power-automate-dynamics-365/

Hope it helps..

Advertisements