First time loading Outlook Web Add-In Error on Console
<p>I have simple add-in of loading SharePoint data on Outlook web add-in using <a href="https://github.com/AzureAD/azure-activedirectory-library-for-js" rel="nofollow noreferrer">ADAL.js</a>, <a href="https://angularjs.org/" rel="nofollow noreferrer">Angular.js</a> &amp; <a href="https://msdn.microsoft.com/en-us/library/office/fp142185.aspx" rel="nofollow noreferrer">Office.js</a>.</p>

<p>My add-in is of Task pane, When any user loads an appointment and select this add-in, it fetches data from SharePoint using ADAL js library using <code>oAuth</code> &amp; <code>REST API</code>, and manipulates some values in new appointment form.</p>

<p>Here is the Guide link for <a href="https://www.itunity.com/article/started-adaljs-office-365-apis-2144" rel="nofollow noreferrer">Getting Started with adal.js and the Office 365 APIs</a>.</p>

<p>Below is my <code>index.html</code> file:</p>

<pre><code>&lt;!DOCTYPE html&gt;
&lt;html lang="en"&gt;
&lt;head&gt;
&lt;meta charset="UTF-8" /&gt;
&lt;meta http-equiv="X-UA-Compatible" content="IE=Edge" /&gt;
&lt;title&gt;My O365 Add-In&lt;/title&gt;

&lt;link href="../Content/Office.css" rel="stylesheet" type="text/css" /&gt;
&lt;link href="../Content/Custom.css" rel="stylesheet" type="text/css" /&gt;

&lt;script src="//appsforoffice.microsoft.com/lib/1/hosted/office.js" type="text/javascript"&gt;&lt;/script&gt;
&lt;script src="../Scripts/jquery-1.9.1.js" type="text/javascript"&gt;&lt;/script&gt;
&lt;script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.5.0/angular.js" type="application/javascript"&gt;&lt;/script&gt;
&lt;script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.5.0/angular-route.js" type="application/javascript"&gt;&lt;/script&gt;
&lt;script src="../Scripts/adal.min.js" type="application/javascript"&gt;&lt;/script&gt;
&lt;script src="../Scripts/adal-angular.min.js" type="application/javascript"&gt;&lt;/script&gt;
&lt;/head&gt;
&lt;body ng-app="OfficeApp"&gt;
    &lt;div ng-view&gt;&lt;/div&gt;
    &lt;script src="Scripts/App.Module.js" type="application/javascript"&gt;&lt;/script&gt;
    &lt;script src="Scripts/App.Routes.js" type="application/javascript"&gt;&lt;/script&gt;
    &lt;script src="Scripts/Services/responseServices.js" type="application/javascript"&gt;&lt;/script&gt;
    &lt;script src="Scripts/Controllers/addInController.js" type="application/javascript"&gt;&lt;/script&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>Similar source can be found on GitHub <a href="https://github.com/matejv1/TrainingContent/tree/master/O3657/O3657-3%20Building%20Office%20Apps%20for%20Outlook%20Using%20Angular%20and%20Material%20Design/Completed%20Project/src" rel="nofollow noreferrer">here</a>.</p>

<p>When I try to load the add-in for the first time it gives below error in <code>office.js</code> file, after first call, if I load that add-in again, it works properly.</p>

<p>Error is: </p>

<blockquote>
  <p>Value cannot be null. Parameter name: ConversationId</p>
</blockquote>

<p><a href="https://i.stack.imgur.com/E8wte.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/E8wte.png" alt="enter image description here"></a></p>

<p>This <a href="https://github.com/AzureAD/azure-activedirectory-library-for-js/issues/156" rel="nofollow noreferrer">issue</a> is already logged on GitHub and tried all the possible solution. but nothing worked out for me. </p>

<p>Does anyone have encountered such error? I am very glad if you can help me on this.</p>

<p>Thanks in advance.</p>