Office365 Outlook Web加载项office 365 OWA getCallbackTokenAsync return“;“失败”;但在OWA中最近的UI更新之后,Outlook客户端可以正常工作

Office365 Outlook Web加载项office 365 OWA getCallbackTokenAsync return“;“失败”;但在OWA中最近的UI更新之后,Outlook客户端可以正常工作,office365,office-js,outlook-restapi,outlook-web-addins,Office365,Office Js,Outlook Restapi,Outlook Web Addins,关于我们开发的加载项,在Office 365 OWA的新UI更新之前,它工作得非常好 我使用getCallbackTokenAsync()在代码中获取用于身份验证的令牌,以便从mail对象访问某些“ExtendedProperty”。到目前为止,一切工作都很顺利,但在ui更新getCallbackTokenAsync()之后,仅在OWA中返回“失败”,但通过在outlook客户端中使用同一用户,加载项工作正常 无法想象这里出了什么问题,服务器返回客户端中的令牌,但不返回OWA中的令牌? 总是新的

关于我们开发的加载项,在Office 365 OWA的新UI更新之前,它工作得非常好

我使用
getCallbackTokenAsync()
在代码中获取用于身份验证的令牌,以便从mail对象访问某些“ExtendedProperty”。到目前为止,一切工作都很顺利,但在ui更新
getCallbackTokenAsync()
之后,仅在OWA中返回“失败”,但通过在outlook客户端中使用同一用户,加载项工作正常

无法想象这里出了什么问题,服务器返回客户端中的令牌,但不返回OWA中的令牌? 总是新的更新有更多复杂的调试

这真的是更新吗?或者浏览器上有安全性的东西

甚至无法猜测,因为它在一个地方工作,而不是在另一个平台

更新1: 浏览器控制台中的详细错误对象

因此,如果在OWA中访问受限,那么问题是如何通过Outlook客户端授予访问权限

更新2:回调的清单和代码

清单------

<?xml version="1.0" encoding="UTF-8"?>
<OfficeApp xmlns="http://schemas.microsoft.com/office/appforoffice/1.1"
           xmlns:bt="http://schemas.microsoft.com/office/officeappbasictypes/1.0" 
           xmlns:mailappor="http://schemas.microsoft.com/office/mailappversionoverrides/1.0" 
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="MailApp">

  <!-- Begin Basic Settings: Add-in metadata, used for all versions of Office unless override provided. -->

  <!-- IMPORTANT! Id must be unique for your add-in, if you reuse this manifest ensure that you change this id to a new GUID. -->
  <Id>0ee7b924-eb57-414f-aeb3-0230b6a768ce</Id>

  <!--Version. Updates from the store only get triggered if there is a version change. -->
  <Version>1.0.0.0</Version>
  <ProviderName>Local</ProviderName>
  <DefaultLocale>de-de</DefaultLocale>

  <!-- The display name of your add-in. Used on the store and various places of the Office UI such as the add-ins dialog. -->
  <DisplayName DefaultValue="Retriever (V5) V1" >
  <Override Locale="en-US" Value="Version 5 (Stable)"/>
  </DisplayName>
  <Description DefaultValue=
   "Descriptiom">
   <Override Locale="en-US" Value=
   "Description (Angular V5 (BETA)."/>
</Description>

  <!-- Icon for your add-in. Used on installation screens and the add-ins dialog. -->
  <IconUrl DefaultValue="https://addin_url/assets/retriever-icon-32.png" />
  <HighResolutionIconUrl DefaultValue="https://addin_url/assets/retriever-hi-res-icon.png"/>

  <!--If you plan to submit this add-in to the Office Store, uncomment the SupportUrl element below-->
  <SupportUrl DefaultValue="https://addin_url" />

  <!-- Domains that will be allowed when navigating. For example, if you use ShowTaskpane and then have an href link, navigation will only be allowed if the domain is on this list. -->
  <AppDomains>
    <AppDomain>https://addin_url</AppDomain>
    <AppDomain>https://addin_url</AppDomain>
    <AppDomain>AppDomain3</AppDomain>
  </AppDomains>
  <!--End Basic Settings. -->

  <Hosts>
    <Host Name="Mailbox" />
  </Hosts>
  <Requirements>
    <Sets>
      <Set Name="Mailbox" MinVersion="1.1" />
    </Sets>
  </Requirements>
  <FormSettings>
    <Form xsi:type="ItemRead">
      <DesktopSettings>
        <SourceLocation DefaultValue="https://addin_url/#archived_mail_retrieve"/>
        <RequestedHeight>250</RequestedHeight>
      </DesktopSettings>
    </Form>
  </FormSettings>

  <Permissions>ReadWriteItem</Permissions>
  <Rule xsi:type="RuleCollection" Mode="Or">
    <Rule xsi:type="ItemIs" ItemType="Message" FormType="Read" />
  </Rule>
  <DisableEntityHighlighting>false</DisableEntityHighlighting>

  <VersionOverrides xmlns="http://schemas.microsoft.com/office/mailappversionoverrides" xsi:type="VersionOverridesV1_0">
    <Requirements>
      <bt:Sets DefaultMinVersion="1.5">
        <bt:Set Name="Mailbox" />
      </bt:Sets>
    </Requirements>

     <VersionOverrides xmlns="http://schemas.microsoft.com/office/mailappversionoverrides/1.1" xsi:type="VersionOverridesV1_1">
         <Requirements>
            <bt:Sets DefaultMinVersion="1.5">
               <bt:Set Name="Mailbox" />
            </bt:Sets>
         </Requirements>
         <Hosts>
            <Host xsi:type="MailHost">
              <DesktopFormFactor>
                 <!-- Location of the Functions that UI-less buttons can trigger (ExecuteFunction Actions). -->
                 <FunctionFile resid="fnFile" />
                 <ExtensionPoint xsi:type="MessageReadCommandSurface">
            <!-- Use the default tab of the ExtensionPoint or create your own with <CustomTab id="myTab"> -->
            <OfficeTab id="TabDefault">
              <!-- Up to 6 Groups added per Tab -->
              <Group id="msgReadGroup">
                <Label resid="groupLabel" />
                <!-- Launch the add-in : task pane button -->
                <Control xsi:type="Button" id="msgReadOpenPaneButton">
                  <Label resid="paneReadButtonLabel" />
                  <Supertip>
                    <Title resid="paneReadSuperTipTitle" />
                    <Description resid="paneReadSuperTipDescription" />
                  </Supertip>
                  <Icon>
                    <bt:Image size="16" resid="icon16" />
                    <bt:Image size="32" resid="icon32" />
                    <bt:Image size="80" resid="icon80" />
                  </Icon>
                  <Action xsi:type="ShowTaskpane">
                    <SourceLocation resid="messageReadTaskPaneUrl" />
                  </Action>
                </Control>
                <!-- Go to http://aka.ms/ButtonCommands to learn how to add more Controls: ExecuteFunction and Menu -->
              </Group>
            </OfficeTab>
          </ExtensionPoint>

                 <!-- Go to http://aka.ms/ExtensionPointsCommands to learn how to add more Extension Points: MessageRead, AppointmentOrganizer, AppointmentAttendee -->
              </DesktopFormFactor>

               <MobileFormFactor>
                  <FunctionFile resid="fnFile" />
                  <ExtensionPoint xsi:type="MobileMessageReadCommandSurface">
                     <Group id="mobileGroupID">
                        <Label resid="residAppName" />
                        <Control xsi:type="MobileButton" id="TaskPaneBtn">
                           <Label resid="residTaskPaneButtonName" />
                           <Icon xsi:type="bt:MobileIconList">
                              <bt:Image size="25" scale="1" resid="icon16" />
                              <bt:Image size="25" scale="2" resid="icon16" />
                              <bt:Image size="25" scale="3" resid="icon16" />
                              <bt:Image size="32" scale="1" resid="icon16" />
                              <bt:Image size="32" scale="2" resid="icon16" />
                              <bt:Image size="32" scale="3" resid="icon16" />
                              <bt:Image size="48" scale="1" resid="icon16" />
                              <bt:Image size="48" scale="2" resid="icon16" />
                              <bt:Image size="48" scale="3" resid="icon16" />
                           </Icon>
                           <Action xsi:type="ShowTaskpane">
                              <SourceLocation resid="messageReadTaskPaneUrl" />
                           </Action>
                        </Control>
                     </Group>
                  </ExtensionPoint>
               </MobileFormFactor>
            </Host>
         </Hosts>
         <Resources>
            <bt:Images>
               <bt:Image id="icon16" DefaultValue="https://addin_url/assets/retriever-icon-16.png"/>
               <bt:Image id="icon32" DefaultValue="https://addin_url/assets/retriever-icon-32.png"/>
               <bt:Image id="icon80" DefaultValue="https://addin_url/assets/retriever-icon-80.png"/>
            </bt:Images>
            <bt:Urls>
               <bt:Url id="fnFile" DefaultValue="https://addin_url/#archived_mail_retrieve" />
               <bt:Url id="messageReadTaskPaneUrl" DefaultValue="https://addin_url/#archived_mail_retrieve" />
            </bt:Urls>
           <bt:ShortStrings>
              <bt:String id="groupLabel" DefaultValue="Addin-Group" />
              <bt:String id="customTabLabel" DefaultValue="Archiver-Tab" />
              <bt:String id="paneReadButtonLabel" DefaultValue="Retriever" />
              <bt:String id="paneReadSuperTipTitle" DefaultValue="Archived-Retriever" />
               <bt:String id="residTaskPaneButtonName" DefaultValue="Retriever" />
               <bt:String id="residAppName" DefaultValue="Archived-Retriever" />
               <bt:String id="residTaskpaneUrl" DefaultValue="Archived-Retriever" />
           </bt:ShortStrings>
           <bt:LongStrings>
               <bt:String id="paneReadSuperTipDescription" DefaultValue="Decription for Addins" />

           </bt:LongStrings>
         </Resources>
      </VersionOverrides>
      </VersionOverrides>
</OfficeApp>
函数获取令牌并将其传递给函数,但条件失败并转到其他条件,在浏览器控制台中打印的结果可以在更新1中看到图像。 更新3

在上面的代码中

Office.context.mailbox.getCallbackTokenAsync({isRest: true, "asyncContext" : this.__archiveComponent}, function(result)
第行表示“asyncContext”被许可给类对象(我已经创建了类的对象),该对象就是这个 result.asyncContext.getMultiValueExtendedProperty(accessToken,数据[0])

所以现在,如果我用任何字符串替换“asyncContext”的类对象并打印令牌,那么是的,它会工作并成功打印tocken,但不会打印对象

注意:在Office.js库更新之前,上述代码运行良好,更新之后,我们发现了“asyncContext”的问题


如果在这里更改了任何内容,那么从getCallbackTokenAsync()访问令牌的正确方法是什么函数。要传递给身份验证用户???

在新OWA中使用getCallbackTokenAsync时出现的控制台错误是什么?在浏览器控制台中,它是“结果”。状态“返回”“失败”详细信息不再显示您是否在消息读取模式或消息编写模式下尝试API?我们无法在消息读取模式中重现此问题d模式。如果可能的话,你能给我们提供错误日志吗?我处于消息读取模式,我将在下一篇评论中提供日志。我已经用图像中更多的错误对象更新了问题。
setConfig(data : any){
  this.config = data[0];
  config_array = data[0]
  console.log(data[0]);
  localStorage.setItem('app_config',JSON.stringify(data[0]));
  Office.context.mailbox.getCallbackTokenAsync({isRest: true, "asyncContext" : this.__archiveComponent}, function(result){
    if (result.status === "succeeded") {
      let accessToken = result.value;
        //Calling a function to get the token out of current fuction.
      result.asyncContext.getMultiValueExtendedProperty(accessToken,data[0]);
    } else {
      console.log(result);
    }
}); 
}
Office.context.mailbox.getCallbackTokenAsync({isRest: true, "asyncContext" : this.__archiveComponent}, function(result)