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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
rakeshkava
Regular Visitor

Want to create report in workspace A using dataset present in workspace B - PowerBI Emdedded

Hi All,

 

I am trying to create report in custom workspace using the dataset present in standard workspace, but when I do this I am getting 403 forbidden error https://wabi-us-north-central-j-primary-redirect.analysis.windows.net/explore/explorations/?name=Tes...


I am using .NETSDK to generate embedded token to create this report dynamically using Java SDK on frontend.

Any help or sample code or any specific workspace configuration to make this work will be of great help!! Thanks

1 ACCEPTED SOLUTION
rakeshkava
Regular Visitor

Hey Guys,

 

Just an update that backend .NET code was all good and no issues but only change we had to make was on the Typescript code on client side SDK , save as overload which accepts targetworkspaceid after using the overloaded method on UI side report is getting saved in custom workspace using the datatset from standard workspace.

I was hoping since embedded URL  was generated , had all needed info like target workspace and primary workspace dataset id, so never thought we would have to also modify Save to accept target workspace id on UI side.

 

Thanks to all for looking and trying to help me on this

View solution in original post

8 REPLIES 8
rakeshkava
Regular Visitor

Hey Guys,

 

Just an update that backend .NET code was all good and no issues but only change we had to make was on the Typescript code on client side SDK , save as overload which accepts targetworkspaceid after using the overloaded method on UI side report is getting saved in custom workspace using the datatset from standard workspace.

I was hoping since embedded URL  was generated , had all needed info like target workspace and primary workspace dataset id, so never thought we would have to also modify Save to accept target workspace id on UI side.

 

Thanks to all for looking and trying to help me on this

Zanqueta
Super User
Super User

Hi @rakeshkava 

 

The 403 Forbidden error indicates that the generated token does not have permission to access the dataset located in a different workspace. This is expected behaviour in Power BI Embedded when attempting to use resources across workspaces without the correct configuration.

Why does this occur?

  • Each workspace has its own security context.
  • The embed token generated via the .NET SDK only grants access to resources within the same workspace or those explicitly shared.
  • When creating a report in Workspace A using a dataset from Workspace B, you must ensure:
    • The user or service principal generating the token has access to the dataset.
    • The dataset is enabled for cross-workspace sharing.

How to resolve this?

1. Enable “Use datasets across workspaces”

In the Power BI Service:
  • Navigate to Admin Portal > Tenant Settings.
  • Enable the option “Use datasets across workspaces”.
  • Ensure the appropriate security groups are included.

2. Configure Dataset Permissions

  • The user (or service principal) generating the token must have:
    • Build permission on the dataset in Workspace B.
    • This can be granted via Manage Permissions on the dataset.

3. Configure the Embed Token

When generating the token using the .NET SDK:
  • Use GenerateTokenRequestV2 with:
    • accessLevel = "Create" for report creation.
    • Include the datasetId from Workspace B.
    • Include the targetWorkspaceId for Workspace A.
Example in C#:
var generateTokenRequestParameters = new GenerateTokenRequestV2
{
    Reports = new List<GenerateTokenRequestV2Report>(),
    Datasets = new List<GenerateTokenRequestV2Dataset>
    {
        new GenerateTokenRequestV2Dataset { Id = datasetId }
    },
    TargetWorkspaces = new List<GenerateTokenRequestV2TargetWorkspace>
    {
        new GenerateTokenRequestV2TargetWorkspace { Id = workspaceAId }
    },
    AccessLevel = "Create"
};

var embedToken = await client.EmbedToken.GenerateTokenAsync(generateTokenRequestParameters);
​
 

4. Verify Capacity

  • Both workspaces must be in Premium or Embedded Capacity to support this scenario.

Official documentation:
 

If this response was helpful in any way, I’d gladly accept a 👍much like the joy of seeing a DAX measure work first time without needing another FILTER.

Please mark it as the correct solution. It helps other community members find their way faster (and saves them from another endless loop 🌀.

If this response was helpful in any way, I’d gladly accept a kudo.
Please mark it as the correct solution. It helps other community members find their way faster.
Connect with me on LinkedIn

rakeshkava_1-1767876060284.png

 

Hi , we are using the Fabric capacity latest from MS and we have the settings enabled for Use datasets across workspaces at tenant settings level, also service principal has Admin permissions(All Permissions) on dataset.

rakeshkava_0-1767875869492.png

Also the latest dot not code what we use is not having AccessLevel property, I guess this must not be an issues, we are on Fabric Capacity.
With all above we are still getting 403 error while saving report , we are able to generate token but saving is failing with 403.
https://wabi-us-north-central-j-primary-redirect.analysis.windows.net/explore/explorations/?name=Tes...


 

rakeshkava_2-1767876075322.png

 

rohit1991
Super User
Super User

Hii @rakeshkava 

 

In Power BI Embedded you can only create a report in Workspace A using a dataset from Workspace B if the dataset in B is exposed as a shared semantic model and the embedding identity has Build permission on that dataset (and the tenant setting allows it). A 403 typically means the embed token/user/service principal does not have Build on the dataset in Workspace B or the dataset isn’t shared for cross-workspace use. Fix: in Workspace B grant the embedding identity Build on the dataset (or add it to a role that has Build), enable “Users can use datasets across workspaces” / shared dataset feature in tenant settings, then generate the embed token including the datasetId from B and target workspace/report in A.


Did it work? ✔ Give a Kudo • Mark as Solution – help others too!

Hi , we are using the Fabric capacity latest from MS and we have the settings enabled for Use datasets across workspaces at tenant settings level, also service principal has Admin permissions(All Permissions) on dataset.

rakeshkava_0-1767875869492.png

Also the latest dot not code what we use is not having AccessLevel property, I guess this must not be an issues, we are on Fabric Capacity.
With all above we are still getting 403 error while saving report , we are able to generate token but saving is failing with 403.
https://wabi-us-north-central-j-primary-redirect.analysis.windows.net/explore/explorations/?name=Tes...


 

rakeshkava_3-1767876111063.png

 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 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.