title: Excel add-ins ribbon click XMLHttpRequest: Network Error 0x800c0019, Security certificate required to access this resource is invalid
body: <p>I have created excel add-ins using office.js, javascript, react etc. I have created ribbon and wants to enable disable ribbon menu conditionally. The code and manifest which I created is working fine on chrome and edge but with IE and desktop browser it's not working. On IE/desktop excel found error on console on click of ribbon menu.
  <strong>XMLHttpRequest: Network Error 0x800c0019, Security certificate required to access this resource is invalid.</strong></p>
  <p>Created ribbon as per suggested in link:
  <a href="https://github.com/OfficeDev/PnP-OfficeAddins/tree/main/Samples/excel-shared-runtime-scenario" rel="nofollow noreferrer">excel-shared-runtime-scenario</a>. In this link at read me section it is mentioned &quot;The addin needs HTTPS website. Please run npx office-addin-dev-certs install --days 365 to install dev certificates.&quot; So the given example from this link working fine when I install this certificate.</p>
  <p><strong>But this certificate I can not use in my own local development. Please help to understand do I need to create certificate for this? if yes how I can create it as I am new to office.js.
  what if I need to move this code on Azure env how I can move this certificate on Azure.</strong></p>
  <p>PSB section from manifest:</p>
  <pre><code>&lt;Group id=&quot;LoginGroup&quot;&gt;
                              &lt;Label resid=&quot;LoginGroup.Label&quot;/&gt;
                              &lt;Icon&gt;
                                  &lt;bt:Image size=&quot;16&quot; resid=&quot;LGButton.Icon&quot;/&gt;
                                  &lt;bt:Image size=&quot;32&quot; resid=&quot;LGButton.Icon&quot;/&gt;
                                  &lt;bt:Image size=&quot;80&quot; resid=&quot;LGButton.Icon&quot;/&gt;
                              &lt;/Icon&gt;
                              &lt;Control xsi:type=&quot;Button&quot; id=&quot;BtnLoginService&quot;&gt;
                                  &lt;Label resid=&quot;BtnLoginService.Label&quot; /&gt;
                                  &lt;Supertip&gt;
                                      &lt;!-- ToolTip title. resid must point to a ShortString resource. --&gt;
                                      &lt;Title resid=&quot;BtnLoginService.Label&quot; /&gt;
                                      &lt;!-- ToolTip description. resid must point to a LongString resource. --&gt;
                                      &lt;Description resid=&quot;BtnLoginService.Tooltip&quot; /&gt;
                                  &lt;/Supertip&gt;
                                  &lt;Icon&gt;
                                      &lt;bt:Image size=&quot;16&quot; resid=&quot;LGButton.Icon&quot;/&gt;
                                      &lt;bt:Image size=&quot;32&quot; resid=&quot;LGButton.Icon&quot;/&gt;
                                      &lt;bt:Image size=&quot;80&quot; resid=&quot;LGButton.Icon&quot;/&gt;
                                  &lt;/Icon&gt;
                                  &lt;!-- This is what happens when the command is triggered (E.g. click on the Ribbon). Supported actions are ExecuteFunction or ShowTaskpane. --&gt;
                                  &lt;Action xsi:type=&quot;ExecuteFunction&quot;&gt;
                                      &lt;FunctionName&gt;btnloginservice&lt;/FunctionName&gt;
                                  &lt;/Action&gt;
                              &lt;/Control&gt;
                              &lt;Control xsi:type=&quot;Button&quot; id=&quot;BtnLogoutService&quot;&gt;
                                  &lt;Label resid=&quot;BtnLogoutService.Label&quot; /&gt;
                                  &lt;Supertip&gt;
                                      &lt;!-- ToolTip title. resid must point to a ShortString resource. --&gt;
                                      &lt;Title resid=&quot;BtnLogoutService.Label&quot; /&gt;
                                      &lt;!-- ToolTip description. resid must point to a LongString resource. --&gt;
                                      &lt;Description resid=&quot;BtnLogoutService.Tooltip&quot; /&gt;
                                  &lt;/Supertip&gt;
                                  &lt;Icon&gt;
                                      &lt;bt:Image size=&quot;16&quot; resid=&quot;SignOutButton.Icon&quot;/&gt;
                                      &lt;bt:Image size=&quot;32&quot; resid=&quot;SignOutButton.Icon&quot;/&gt;
                                      &lt;bt:Image size=&quot;80&quot; resid=&quot;SignOutButton.Icon&quot;/&gt;
                                  &lt;/Icon&gt;
                                  &lt;!-- This is what happens when the command is triggered (E.g. click on the Ribbon). Supported actions are ExecuteFunction or ShowTaskpane. --&gt;
                                  &lt;Action xsi:type=&quot;ExecuteFunction&quot;&gt;
                                      &lt;FunctionName&gt;btnlogoutservice&lt;/FunctionName&gt;
                                  &lt;/Action&gt;
                                  &lt;Enabled&gt;false&lt;/Enabled&gt;
                              &lt;/Control&gt;
                          &lt;/Group&gt;
  </code></pre>
  <p>Command.js code for functionName:</p>
  <pre><code>export function btnloginservice(event) {
      console.log('Open login dialog');
      g.state.isMenuEnabled = true;
      updateRibbon();
      enableButton();
      SetRuntimeVisibleHelper(true);
      event.completed();
  }
  
  export function btnlogoutservice(event) {
      console.log('Open login dialog');
      g.state.isMenuEnabled = false;
      updateRibbon();
      btnCloseTaskpane(event);
  }
  </code></pre>
  <p><strong>I am completely blocked here. Appreciate your help over here.
  Thanks in advance.</strong></p>