OSF.DDA 7000 Excel office js Dialog API error

Viewed 225

enter image description here

My taskpane is on URL https://presimax.in/testhome And dialog box is on https://presimax.in/word

Here is the code for dialog box,

<html>
    <head>
        <title></title>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1">

        <!-- For the Office UI Fabric, go to http://aka.ms/office-ui-fabric to learn more. -->
        <link rel="stylesheet" href="https://appsforoffice.microsoft.com/fabric/2.1.0/fabric.min.css">
        <link rel="stylesheet" href="https://appsforoffice.microsoft.com/fabric/2.1.0/fabric.components.min.css">
        <link rel="stylesheet" href="Styles/index.css">

        <script type="text/javascript" src="https://ajax.aspnetcdn.com/ajax/jQuery/jquery-2.2.1.min.js"></script>

        <!-- Load the Office JavaScript libraries -->
        <script src="https://appsforoffice.microsoft.com/lib/1/hosted/office.js" type="text/javascript" crossorigin="anonymous"></script>

        
    </head>
    <body>
        <div class="ms-typeramp-dialog"> 
            <p class="ms-font-m">Please wait for this window to close, before continuing with the add-in ( changed ).</p> 
        </div>
        <script>
        setTimeout(() => {
          (function () {
            "use strict";
        
            // Office.initialize must be called on every page where Office JavaScript is 
            // called. Other initialization code should go inside it.
            Office.initialize = function() {        
                $(document).ready(function () {  
        
                    try {                
                        // Tell the task pane about the outcome.
                        Office.context.ui.messageParent("Test");
                    }
                    catch(err) { 
                        
                        // Create the outcome message and send it to the task pane.
                        var messageObject = {outcome: "failure", error: err.message};            
                        var jsonMessage = JSON.stringify(messageObject);
        
                        // Tell the task pane about the outcome.
                        Office.context.ui.messageParent("message to parent " + jsonMessage); 
                    }
                });
            }
        }());  
        }, 10000);
        </script> 
    </body>
</html>

This configuration throws an error OSF.DDA.Error code: 7000 message: "You don't have sufficient permissions for this action."

And also this warning,

"Tracking Prevention blocked access to storage for https://appsforoffice.microsoft.com/lib/1/hosted/office.js."

I don't know the reason, it was working initially for 2 months but now it is giving this error.

Thank you in advance.

0 Answers
Related