OfficeDev / office-js-docs-pr

Microsoft Office Add-ins Documentation
https://learn.microsoft.com/office/dev/add-ins
Creative Commons Attribution 4.0 International
403 stars 249 forks source link

Issue with Redirect URI for Vainity/Custom URL #3523

Closed gagandeepsubbi closed 7 months ago

gagandeepsubbi commented 2 years ago

Article URL

https://docs.microsoft.com/en-us/office/dev/add-ins/develop/sso-in-office-add-ins

Issue

We are trying to use the article for SSO and getting the attached error for Redirect URI. The error is seen when we are using Vanity URL for OWA. ERROR

AlexJerabek commented 2 years ago

Thanks for reporting this issue @gagandeepsubbi.

@davidchesnut, could you please investigate?

gagandeepsubbi commented 2 years ago

Hi @davidchesnut Did you get a change to take a look at this?

davidchesnut commented 2 years ago

Hi @gagandeepsubbi,

Sorry for late reply. In the Azure portal, go to your app registration, and go to the Expose an API page. There is an Application ID URI with a value similar to "api://localhost:44351/{app id}" Make sure in your maniifest for the add-in that this value appears exactly in the Resource tag in the WebApplicationInfo section. Also be sure your web server is using the exact port (such as 44351) as specified in the Application ID URI.

Hope this helps, David

ghost commented 2 years ago

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!

gagandeepsubbi commented 2 years ago

Thank you @davidchesnut for your response. To add more details, we are using Exchange Online and not an On-Prem setup. The redirection URL is not pointing to any server. From the error message, the Redirect URI Mismatch is for the vanity URL on the Microsoft Outlook add-in application with id "bc59ab01-8403-45c6-8796-ac3ef710b3e3" and not the Azure app we created.

Please find the URL https://docs.microsoft.com/en-us/office/dev/add-ins/develop/authorize-to-microsoft-graph

We are getting issues in the Office host flow.

AlexJerabek commented 2 years ago

Hi @gagandeepsubbi,

Thank you for the response. We are investigating this issue internally. I'm assigning @mattgeim to follow-up with you.

AlexJerabek commented 7 months ago

This issue was resolved a few months ago, with fix instructions sent to admins through the Admin Message Center. If folks are still having problems, we can reopen the issue.