Showing results for 
Search instead for 
Did you mean: 
Helper I
Helper I

401 - Unauthorized error during Dataset Refresh with a reporting user

Hi all,

I'm running into an issue when refreshing a dataset with another user account.
The connection is set to use another user account, the dataset is in a workspace in a Teams team.

Side info: The dataset is using an on-premise Gateway.


What I've tried so far:

  • I've added the user to the Teams team
  • I've added permissions on the dataset for the user (basically everything that is available on the dataset level)
  • I've logged into the on-premise-gateway with the user.

The result I'm getting in my Flow is:

Input (unformatted)
    "host": {
    "parameters": {
Output (unformatted)
    "headers": {
        "Strict-Transport-Security""max-age=31536000; includeSubDomains",
        "Date""Tue, 14 Sep 2021 15:28:21 GMT",
    "body": {
        "error": {
            "message""The response is not in a JSON format.",
            "innerError""Cannot read server response."


From what I understand from the error code "401" and message "GroupsNotEnabled" this may point to a missing license for the end user, but in Admin center, I see the user has a "PowerBI Pro" license associated with the account.


Any further ideas?

Helper I
Helper I

Hello Rico, thanks for your answer.
The new account is a cloud-only account thats domain is, while my account ends in @mycompany.tld.

For my Flow I used the built-in method "New action" -> "Refresh Dataset" while pointing the connector to my reporting user account, instead of my own account. See below screenshot.



Community Support
Community Support

Hi @_n_MarianLein 

Is your new account in the same organization as your old account?

New account should look like and old account looks like .

401 - Unauthorized error seems related to request credentials. 

For reference:401 Unauthorized - HTTP | MDN (

Did you use Rest API to refresh your dataset?

For reference: Datasets - Refresh Dataset In Group

Please check whether your App have Dataset.ReadWrite.All permission.


Best Regards,
Rico Zhou


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

November Power BI Update 768x460.png

Check it Out!

Click here to read more about the November 2021 Updates!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.