Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
Anonymous
Not applicable

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": {
        "connectionReferenceName""shared_powerbi_2",
        "operationId""RefreshDataset"
    },
    "parameters": {
        "groupid""********-****-****-****-************",
        "datasetid""********-****-****-****-************"
    }
}
Output (unformatted)
{
    "statusCode"401,
    "headers": {
        "X-PowerBI-Error-Info""GroupsNotEnabled",
        "Strict-Transport-Security""max-age=31536000; includeSubDomains",
        "X-Frame-Options""deny",
        "X-Content-Type-Options""nosniff",
        "Access-Control-Expose-Headers""RequestId,X-PowerBI-Error-Info",
        "RequestId""********-001f-48c0-86f0-************",
        "Timing-Allow-Origin""*",
        "x-ms-apihub-cached-response""false",
        "Date""Tue, 14 Sep 2021 15:28:21 GMT",
        "Content-Length""283",
        "Content-Type""application/json"
    },
    "body": {
        "error": {
            "code"401,
            "source""flow-apim-europe-001-francecentral-01.azure-apim.net",
            "clientRequestId""********-c245-4b32-83ed-************",
            "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?

2 REPLIES 2
Anonymous
Not applicable

Hello Rico, thanks for your answer.
The new account is a cloud-only account thats domain is @mycompany365.onmicrosoft.com, 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.

_n_MarianLein_0-1631873237100.png

 

Anonymous
Not applicable

Hi @Anonymous 

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

New account should look like xxx@ABC.com and old account looks like zzz@ABC.com .

401 - Unauthorized error seems related to request credentials. 

For reference:401 Unauthorized - HTTP | MDN (mozilla.org)

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

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.