attempted to perform an unauthorized operation. power automate error

In this Power Automate tutorial, we will see how to fix the error ‘Attempted to perform unauthorized operation‘ that comes in Power Automate.

We got a requirement to create SharePoint sites using Power Automate. Where we created 3 types of SharePoint sites i.e. communication sites, group-connected team sites, and non-group-connected team sites using ‘Send an HTTP request to SharePoint‘ action. Also, we need to set the storage limit and add members to it.

When we create a SharePoint site, in the body of ‘Send an HTTP request to SharePoint’ we define a property called Site owner.

When you set the site owner as xyz@tenant.onmicrosoft.com and the action we are using has a connection using Microsoft credentials, such as xyz@tenant.onmicrosoft.com.

For example, If the connection is ‘chandrika@tenant.onmicrosoft.com’,.

Power Automate error 'Attempted to perform an unauthorized operation'
Power Automate error ‘Attempted to perform an unauthorized operation’

And the SharePoint site( let’s say communication site) we will create, whose owner is ‘haripriya@tenant.onmicrosoft.com’.

Microsoft Power Automate error 'Attempted to perform an unauthorized operation'
Microsoft Power Automate error ‘Attempted to perform an unauthorized operation’

So, when we send a request using ‘Send an HTTP request to SharePoint’, to get the group id from the site, the error occurs. Because the credential we are using to request the SharePoint site to get the group id, is not equal to the credential of the Site owner.

 Error 'Attempted to perform an unauthorized operation' in Power Automate
Error ‘Attempted to perform an unauthorized operation in Power Automate

Fix the error ‘Attempted to perform an unauthorized operation’ in Power Automate

Here we will see how we can fix the error ‘Attempted to perform an unauthorized operation’ in Power Automate.

To fix this error ‘Attempted to perform an unauthorized operation’, we need to change the connection of the ‘ Send an HTTP request to SharePoint’ action. That means the site owner’s credentials, should be equal to the connection of action used to do SharePoint operation in Power Automate.

attempted to perform an unauthorized operation power automate
Error ‘Attempted to perform an unauthorized operation’ in Microsoft Power Automate

Now if we will run the flow, the flow will run successfully.

This is how we fix the error ‘Attempted to perform unauthorized operation‘ in Power Automate.

Conclusion

In this Power Automate tutorial, we saw how to fix the error ‘Attempted to perform unauthorized operation‘ in Microsoft Power Automate.

You may also like:

>