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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
frbastos
New Member

How to enable profile permission workspace Power Bi API

Hi guys, could anyone help me?

I'm developing a SAAS (Software as a Service) application and I want to incorporate Power BI.

I'm following the documentation: https://docs.microsoft.com/pt-br/power-bi/developer/embedded/embed-multi-tenancy, but I'm not able to assign permission to the profiles created.

To release the permissions I'm using the Power BI API. To send the request I am using Postman, as shown below:

1) GET https://api.powerbi.com/v1.0/myorg/groups/{{mygroupid}/users
Header: X-PowerBI-Profile-Id=myprofileid
Response:

 

{
    "value": [
        {
            "groupUserAccessRight": "Admin",
            "displayName": "Numpe",
            "identifier": "326de76f-de5d-46ac-aa03-d88a09149723",
            "principalType": "App",
            "profile": {
                "id": "8c04ccc3-ad55-4add-b0b9-5e294dadac69",
                "displayName": "BaruelVanProfile"
            }
        }
    ]
}

 

 

2) PUT https://api.powerbi.com/v1.0/myorg/groups/{{baruelvan_workspace_id}}/users
Without X-PowerBI-Profile-Id Header
Body: 

 

 

{
    "groupUserAccessRight": "Admin",
    "identifier": "326de76f-de5d-46ac-aa03-d88a09149723",
    "principalType": "App",
    "profile": {
        "id": "8c04ccc3-ad55-4add-b0b9-5e294dadac69"
    }
}

 

 

Response:

 

{
    "error": {
        "code": "PowerBIEntityNotFound",
        "pbi.error": {
            "code": "PowerBIEntityNotFound",
            "parameters": {},
            "details": [],
            "exceptionCulprit": 1
        }
    }
}

 

 

3) 2) PUT https://api.powerbi.com/v1.0/myorg/groups/{{baruelvan_workspace_id}}/users
Header: X-PowerBI-Profile-Id=myprofileid
Body:

 

{
    "groupUserAccessRight": "Admin",
    "identifier": "326de76f-de5d-46ac-aa03-d88a09149723",
    "principalType": "App",
    "profile": {
        "id": "8c04ccc3-ad55-4add-b0b9-5e294dadac69"
    }
}

 

Response:

 

{
    "error": {
        "code": "PowerBINotAuthorizedException",
        "pbi.error": {
            "code": "PowerBINotAuthorizedException",
            "parameters": {},
            "details": [],
            "exceptionCulprit": 1
        }
    }
}

 

 

I would like to know what would be the correct way to make the request to allow access to the workspace.

1 REPLY 1
Anonymous
Not applicable

Hi @frbastos ,

 

Did you use it immediately after assigning it?

Perhaps you could call the Refresh User Permissions API then try again.

https://docs.microsoft.com/en-us/rest/api/power-bi/users/refresh-user-permissions .

 

Best Regards,

Jay

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

Top Solution Authors
Top Kudoed Authors