Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
1 year ago
Solved

Power BI Report Embbeded in mobile layout does not save edit changes

Power BI Report Embbeded in mobile layout does not save edit changes , We have edited the reports and saved via service and desktop and both works fine, but when we do the same via embedded report and save the file, the changes are not saved. we are able to save via desktop layout, so are we missing any configuration?

  • Anonymous's avatar
    Anonymous
    1 year ago

    Hi Anonymous,

    Thank you so much for sharing all the details  that really helps.

    Just to clarify, at present Power BI does not support editing in mobile layout when using embedded reports. That’s why you are getting the 400 Bad Request error when trying to load the report in Edit mode with MobilePortrait layout.

    In mobile view, you can only view the report, not edit and save changes like formatting or value updates. This is a known limitation from Microsoft.
    However, as you have seen, everything works fine in desktop layout with Edit mode  that is the supported way for embedded editing.

    Kindly refer to the below documentation links for better understanding:
    https://learn.microsoft.com/en-us/javascript/api/overview/powerbi/mobile

    Hope this helps if you have any queries we are  happy to assist you further.
    Best regards,
    Harshitha .

6 Replies

  • jaineshp's avatar
    jaineshp
    Icon for Memorable Member rankMemorable Member

    Hey Anonymous,

    Hey there! I've faced this exact same problem before. Here's what worked for me:

    The Issue: Mobile embedded reports need different permissions than desktop - that's the main culprit.

    Solution Steps:

    1. Check Your App Registration
      • Go to Azure AD and verify you have Report.ReadWrite.All permissions
      • Make sure admin consent is granted
    2. Fix Your Embed Code
      • Add permissions: models.Permissions.ReadWrite to your config
      • Set layoutType: models.LayoutType.MobilePortrait explicitly
      • Don't rely on auto-detection for mobile views
    3. Verify Mobile Layout Exists
      • Open the report in Power BI Desktop
      • Check if mobile layout is actually created for each page
      • If missing, create it first (this is often overlooked!)
    4. Workspace Permissions
      • Ensure your app/service principal has Member or Admin role in the workspace
      • Not just Viewer - that won't work for saves
    5. Test This Way
      • First confirm saves work in desktop embedded view
      • Then switch to mobile layout and test again
      • Check browser console for any permission errors

    The mobile layout must exist in the source report before embedding. I spent hours debugging this until I realized some pages didn't have mobile layouts created.

     

    Fixed? ✓ Mark it • Share it • Help others!


    Best Regards,
    Jainesh Poojara | Power BI Developer

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi Anonymous,
      Thank you  for reaching out to the Microsoft fabric community forum.

      I would  like to take a moment to thank you jaineshp for your active participation and the helpful solutions you have shared in the community forum. Your contributions truly make a difference.

      In addition to jaineshp  solution, you can refer to this official document link, which may help resolve your issue.

      https://learn.microsoft.com/en-us/javascript/api/overview/powerbi/mobile

      Hope the above provided information help you resolve the issue, if you have any further concerns or queries, please feel free to reach out to us.

      Best Regards,
      Harshitha.

      • jaineshp's avatar
        jaineshp
        Icon for Memorable Member rankMemorable Member

        Hey Anonymous,

        Thank you for the kind recognition - always happy to contribute to our community's success!

        Best Regards,
        Jainesh Poojara | Power BI Developer

    • Anonymous's avatar
      Anonymous
      Not applicable

      Thanks for the respose jaineshp ,

       

      I Have gone throught the steps and confirmed that i have all the configurations that was mentioned, but i made some observations 

      - With Mobile Layout with following config:

      1) In View mode

      const embedConfig = {
                  type: 'report',
                  id: reportId,
                  embedUrl: embedUrl,
                  accessToken: accessToken,
                  tokenType: models.TokenType.Embed,
                  viewMode:  models.ViewMode.View,
                  permissions: models.Permissions.ReadWrite,
                  settings: {
                      layoutType:models.LayoutType.MobilePortrait
                  }
      };

      i am able to view the report in mobile layout and have no option to edit

       

      2) In Edit Mode

      const embedConfig = {
                  type: 'report',
                  id: reportId,
                  embedUrl: embedUrl,
                  accessToken: accessToken,
                  tokenType: models.TokenType.Embed,
                  viewMode:  models.ViewMode.Edit,
                  permissions: models.Permissions.ReadWrite,
                  settings: {
                      layoutType:models.LayoutType.MobilePortrait
                  }
         };

      the report does not load at all and the console log has some 400 Bad requests

       

      Note: If i load the report in viewMode and then try to convert it to editMode i get the permission issue

       

       

      - With Desktop mode 

      1) With the below config we are able to achive edit mode

      const embedConfig = {
                  type: 'report',
                  id: reportId,
                  embedUrl: embedUrl,
                  accessToken: accessToken,
                  tokenType: models.TokenType.Embed,
                  viewMode: models.ViewMode.Edit,
                  permissions: models.Permissions.All,
                  settings: {
                      filterPaneEnabled: true,
                      hideErrors: true
                  },
                  autoEmbedOnContentLoaded: false
              };

       The desktop view , no issues able to edit anything and save all works fine. But if i move to mobile view

       with this if i re-arrange the visuals and save, it persits but if we make any other changes like :color, value etc.. those are not getting saved.(also console shows some 400 Bad request on save)

      Note: This is in embedded report and not in service.

       

      Here is my settings on getting the accessToken for the report 

      new GenerateTokenRequest(accessLevel: TokenAccessLevel.Edit, allowSaveAs: true);

       

       

      • Anonymous's avatar
        Anonymous
        Not applicable

        Hi Anonymous,

        Thank you so much for sharing all the details  that really helps.

        Just to clarify, at present Power BI does not support editing in mobile layout when using embedded reports. That’s why you are getting the 400 Bad Request error when trying to load the report in Edit mode with MobilePortrait layout.

        In mobile view, you can only view the report, not edit and save changes like formatting or value updates. This is a known limitation from Microsoft.
        However, as you have seen, everything works fine in desktop layout with Edit mode  that is the supported way for embedded editing.

        Kindly refer to the below documentation links for better understanding:
        https://learn.microsoft.com/en-us/javascript/api/overview/powerbi/mobile

        Hope this helps if you have any queries we are  happy to assist you further.
        Best regards,
        Harshitha .