Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Microsoft authorization within OfficeJS dialog does not redirect to the web page on IOS devices #4397

Open
max-yushchuk opened this issue Apr 24, 2024 · 4 comments
Assignees
Labels
Area: Outlook Issue related to Outlook add-ins Needs: author feedback Waiting for author (creator) of Issue to provide more info

Comments

@max-yushchuk
Copy link

The user is not able to authorize to the Addin using OfficeJS dialog and Oauth 2.0 authorization code flow https://learn.microsoft.com/en-us/entra/identity-platform/v2-oauth2-auth-code-flow

Previously everything has been working fine. But now it just freezes on the "login.microsoftonline.com" screen and does not redirect to the redirect_uri in the query string.

Besides everything works correctly on Android, Outlook for Windows (Classic and New), Outlook for Mac, and all browsers.

Your Environment

  • Platform: IOS
  • Host: Outlook for IOS
  • Office version number: the latest from the CDN
  • Operating System: IOS 17.4.1

Expected behavior

After successful MS authorization, the user should be redirected to the redirect_uri from the query string.

Current behavior

White screen and no redirect.

Steps to reproduce

  1. Use Microsoft Oauth 2.0 authorization code flow to authorize to the Microsoft
  2. Go through the authorization process: use your email and password
  3. Click "Yes" or "No" on the "Stay signed in?" page
  4. The page becomes white and does not redirect to the appropriate redirect_uri

Context

It's critical issue because users cannot authorize to the Addin. We use MS authorization as a fallback for SSO (SSO is not supported on mobile).

Video:

movstash.MOV

Screenshot:
screenshot1

@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs: triage 🔍 New issue, needs PM on rotation to triage ASAP label Apr 24, 2024
@exextoc exextoc added Needs: attention 👋 Waiting on Microsoft to provide feedback Area: Outlook Issue related to Outlook add-ins and removed Needs: triage 🔍 New issue, needs PM on rotation to triage ASAP labels Apr 24, 2024
@exextoc exextoc self-assigned this Apr 24, 2024
@anjalitp
Copy link
Collaborator

Could you please share the add-in manifest so that we can try reproducing the issue on our side? Also, please mention the Outlook version on which you are seeing this issue.

@anjalitp anjalitp added Needs: author feedback Waiting for author (creator) of Issue to provide more info and removed Needs: attention 👋 Waiting on Microsoft to provide feedback labels Apr 28, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added the Status: no recent activity Issue or PR is stale (no recent activity) label May 2, 2024
@svehera
Copy link

svehera commented May 3, 2024

@anjalitp I am working with Max.
Outlook version on IOS is 4.2414.0
Here is manifest

<?xml version="1.0" encoding="UTF-8"?>
<OfficeApp xmlns="http://schemas.microsoft.com/office/appforoffice/1.1"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:bt="http://schemas.microsoft.com/office/officeappbasictypes/1.0"
  xmlns:mailappor="http://schemas.microsoft.com/office/mailappversionoverrides/1.0" 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>manifestId</Id><!--  -->
  <!--Version. Updates from the store only get triggered if there is a version change. -->
  <Version>0.0.0.1</Version>
  <ProviderName>ProviderName</ProviderName>
  <DefaultLocale>en-US</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="DisplayName" />
  <Description DefaultValue="Description" />
  <IconUrl DefaultValue="https://localhost:44343/assets/images/logo-64.png" />
  <HighResolutionIconUrl DefaultValue="https://localhost:44343/assets/images/logo-128.png" />
  <!-- 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://login.microsoftonline.com</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://localhost:44343" />
        <RequestedHeight>300</RequestedHeight>
      </DesktopSettings>
      <TabletSettings>
        <SourceLocation DefaultValue="https://localhost:44343" />
        <RequestedHeight>300</RequestedHeight>
      </TabletSettings>
      <PhoneSettings>
        <SourceLocation DefaultValue="https://localhost:44343" />
      </PhoneSettings>
    </Form>
  </FormSettings>
  <Permissions>ReadWriteMailbox</Permissions>
  <Rule xsi:type="RuleCollection" Mode="Or">
    <Rule xsi:type="ItemIs" ItemType="Message" FormType="Read" />
    <Rule xsi:type="ItemIs" ItemType="Appointment" FormType="Read" />
  </Rule>
  <DisableEntityHighlighting>false</DisableEntityHighlighting>
  <VersionOverrides xmlns="http://schemas.microsoft.com/office/mailappversionoverrides" xsi:type="VersionOverridesV1_0">
    <Requirements>
      <bt:Sets DefaultMinVersion="1.3">
        <bt:Set Name="Mailbox" />
      </bt:Sets>
    </Requirements>
    <Hosts>
      <Host xsi:type="MailHost">
        <DesktopFormFactor>
          <!-- Message Read -->
          <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>
          <!-- Appointment read form -->
          <ExtensionPoint xsi:type="AppointmentAttendeeCommandSurface">
            <OfficeTab id="TabDefault">
              <Group id="apptReadGroup">
                <Label resid="groupLabel" />
                <!-- Task pane button -->
                <Control xsi:type="Button" id="apptReadOpenPaneButton">
                  <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>
              </Group>
            </OfficeTab>
          </ExtensionPoint>
          <!-- Go to http://aka.ms/ExtensionPointsCommands to learn how to add more Extension Points: MessageRead, AppointmentOrganizer, AppointmentAttendee -->
        </DesktopFormFactor>
      </Host>
    </Hosts>
    <Resources>
      <bt:Images>
        <bt:Image id="icon16" DefaultValue="https://localhost:44343/assets/images/logo-16.png" />
        <bt:Image id="icon32" DefaultValue="https://localhost:44343/assets/images/logo-32.png" />
        <bt:Image id="icon80" DefaultValue="https://localhost:44343/assets/images/logo-80.png" />
      </bt:Images>
      <bt:Urls>
        <bt:Url id="messageReadTaskPaneUrl" DefaultValue="https://localhost:44343" />
      </bt:Urls>
      <bt:ShortStrings>
        <bt:String id="groupLabel" DefaultValue="Documents" />
        <bt:String id="customTabLabel" DefaultValue="Mail" />
        <bt:String id="paneReadButtonLabel" DefaultValue="Mail" />
        <bt:String id="paneReadSuperTipTitle" DefaultValue="Documents" />
      </bt:ShortStrings>
      <bt:LongStrings>
        <bt:String id="paneReadSuperTipDescription" DefaultValue="Opens a pane displaying all available filing locations with ability to file them." />
      </bt:LongStrings>
    </Resources>
    <!-- VersionOverrides for the v1.1 schema -->
    <VersionOverrides xmlns="http://schemas.microsoft.com/office/mailappversionoverrides/1.1" xsi:type="VersionOverridesV1_1">
      <Requirements>
        <!-- add information on requirements -->
        <bt:Sets DefaultMinVersion="1.3">
          <bt:Set Name="Mailbox" />
        </bt:Sets>
      </Requirements>
      <Hosts>
        <Host xsi:type="MailHost">
          <!-- add information on form factors -->
          <DesktopFormFactor>
            <!-- Message Read -->
            <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" />
                      <SupportsPinning>true</SupportsPinning>
                    </Action>
                  </Control>
                  <!-- Go to http://aka.ms/ButtonCommands to learn how to add more Controls: ExecuteFunction and Menu -->
                </Group>
              </OfficeTab>
            </ExtensionPoint>
            <!-- Appointment read form -->
            <ExtensionPoint xsi:type="AppointmentAttendeeCommandSurface">
              <OfficeTab id="TabDefault">
                <Group id="apptReadGroup">
                  <Label resid="groupLabel" />
                  <!-- Task pane button -->
                  <Control xsi:type="Button" id="apptReadOpenPaneButton">
                    <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" />
                      <SupportsPinning>true</SupportsPinning>
                    </Action>
                  </Control>
                </Group>
              </OfficeTab>
            </ExtensionPoint>

            <!-- Message Compose -->
            <ExtensionPoint xsi:type="MessageComposeCommandSurface">
              <OfficeTab id="TabDefault">
                <Group id="msgComposeCmdGroup">
                  <Label resid="groupLabel"/>
                  <Control xsi:type="Button" id="msgReadOpenPaneButton1">
                    <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" />
                      <SupportsPinning>true</SupportsPinning>
                    </Action>
                  </Control>
                </Group>
              </OfficeTab>
            </ExtensionPoint>

            <!-- Go to http://aka.ms/ExtensionPointsCommands to learn how to add more Extension Points: MessageRead, AppointmentOrganizer, AppointmentAttendee -->
          </DesktopFormFactor>
          <!--Mobile-->
          <MobileFormFactor>
            <ExtensionPoint xsi:type="MobileMessageReadCommandSurface">
              <Group id="msgReadGroup">
                <Label resid="groupLabel" />
                <Control xsi:type="MobileButton" id="msgReadOpenPaneButton">
                  <Label resid="paneReadButtonLabel" />
                  <Icon xsi:type="bt:MobileIconList">
                    <bt:Image size="25" scale="1" resid="icon16" />
                    <bt:Image size="25" scale="2" resid="icon32" />
                    <bt:Image size="25" scale="3" resid="icon80" />
                    <bt:Image size="32" scale="1" resid="icon16" />
                    <bt:Image size="32" scale="2" resid="icon32" />
                    <bt:Image size="32" scale="3" resid="icon80" />
                    <bt:Image size="48" scale="1" resid="icon16" />
                    <bt:Image size="48" scale="2" resid="icon32" />
                    <bt:Image size="48" scale="3" resid="icon80" />
                  </Icon>
                  <Action xsi:type="ShowTaskpane">
                    <SourceLocation resid="messageReadTaskPaneUrl" />
                  </Action>
                </Control>
              </Group>
            </ExtensionPoint>
          </MobileFormFactor>
        </Host>
      </Hosts>
      <Resources>
        <bt:Images>
          <bt:Image id="icon16" DefaultValue="https://localhost:44343/assets/images/logo-16.png" />
          <bt:Image id="icon32" DefaultValue="https://localhost:44343/assets/images/logo-32.png" />
          <bt:Image id="icon80" DefaultValue="https://localhost:44343/assets/images/logo-80.png" />
        </bt:Images>
        <bt:Urls>
          <bt:Url id="messageReadTaskPaneUrl" DefaultValue="https://localhost:44343" />
        </bt:Urls>
        <bt:ShortStrings>
          <bt:String id="groupLabel" DefaultValue="Documents" />
          <bt:String id="customTabLabel" DefaultValue="Documents" />
          <bt:String id="paneReadButtonLabel" DefaultValue="Documents" />
          <bt:String id="paneReadSuperTipTitle" DefaultValue="Documents" />
        </bt:ShortStrings>
        <bt:LongStrings>
          <bt:String id="paneReadSuperTipDescription" DefaultValue="Opens a pane displaying all available filing locations with ability to file them." />
        </bt:LongStrings>
      </Resources>
    </VersionOverrides>
  </VersionOverrides>
</OfficeApp>

@microsoft-github-policy-service microsoft-github-policy-service bot removed the Status: no recent activity Issue or PR is stale (no recent activity) label May 3, 2024
@neprasad-microsoft neprasad-microsoft added Needs: attention 👋 Waiting on Microsoft to provide feedback and removed Needs: author feedback Waiting for author (creator) of Issue to provide more info labels May 6, 2024
@DivyaPatidar
Copy link

DivyaPatidar commented May 7, 2024

@svehera The manifest shared above has localhost URLs, so we can not test using this manifest. Is it possible for you to share manifest with deployed URLs so that we can install and test it?

Can you also share which Office JS API you are using for dialog?

@DivyaPatidar DivyaPatidar added the Needs: author feedback Waiting for author (creator) of Issue to provide more info label May 9, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added the Status: no recent activity Issue or PR is stale (no recent activity) label May 14, 2024
Copy link
Contributor

This issue has been automatically marked as stale because it is marked as needing author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. Thank you for your interest in Office Add-ins!

@exextoc exextoc removed the Needs: attention 👋 Waiting on Microsoft to provide feedback label May 17, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot removed the Status: no recent activity Issue or PR is stale (no recent activity) label May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Outlook Issue related to Outlook add-ins Needs: author feedback Waiting for author (creator) of Issue to provide more info
Projects
None yet
Development

No branches or pull requests

6 participants