Comments (5)
Hi
I've found a way to trigger this consistently after the Add-in is setup. And a workaround to bypass the error.
Triggering the error
If I change (or remove) the Redirect URIs in SPA setup in Authentication in the AAD App I can trigger the usual
Sorry, but weβre having trouble signing you in.
AADSTS50011: The reply URL specified in the request does not match the reply URLs configured for the application
error, as expected.
Now I can close the popup, change the Redirect URIs back to the valid URI and trigger login (signInO365) which should work, but I get the error as described in this issue.
Bypass error
To bypass this I clear cookies (on my domain), not localStorage
or sessionStorage
, but cookies.
MSAL will create a bunch of non-HttpOnly cookies, and by clearing these the login will work as expected.
There is a bug in the sample, where the Promise
from msalInstance.loginRedirect
is ignored, this is where I add a catch
and do something like this: https://stackoverflow.com/a/179514 .
I tried to find some "clear" method in MSAL, but didn't see anything.
from office-add-in-samples.
Hi @inspiraller and @eirikb,
Yes, following @eirikb's repo steps I see this same problem. @inspiraller does clearing the cookies fix the issue for you? I'm checking with the team to see if there's a better solution. Thanks!
from office-add-in-samples.
Hi @inspiraller,
I apologize as I missed an important detail in your repo steps. Your steps indicate that you configured a web redirect. You need to use an SPA redirect since this sample is a single-page application. You can configure this from the Redirect URIs links on the Overview page in your App registration on the Azure portal. This will take you to the Platform configurations page where you can Add a platform and then choose Single-page application.
Hope this helps,
David
from office-add-in-samples.
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!
from office-add-in-samples.
This issue has been closed due to inactivity. Please comment if you still need assistance and we'll re-open the issue.
from office-add-in-samples.
Related Issues (20)
- Outlook Web Add-in Blazor Example for OnMessageSend Event HOT 6
- Excel does not launch when running the sample HOT 11
- idMSOs in PowerPoint? HOT 4
- How can I get access token for multiple resources based on sample Office-Add-in-Microsoft-Graph-React HOT 16
- how to uninstall the Web-Addin in Excel-Online if installed the way by uploading an manifest.xml HOT 1
- excel-insert-file not working as expected HOT 3
- How can we test outlook add-in in Visual Studio HOT 1
- Azure CLI not found when running npm run configure-sso HOT 10
- Office-Add-in-NodeJS-SSO - change root url HOT 1
- Install Addin fails HOT 3
- No Excel ContentApp sample found which works with Microsoft 365 integrated app publishing HOT 2
- Sideloading Excel ContentApp on Excel for Mac does not work HOT 2
- Add-In pop up could not be started. Error 404. HOT 1
- Can not sign-in with msaljs popup on Safari browser based on Samples/auth/Office-Add-in-Microsoft-Graph-React HOT 4
- Better way to handle unidentified image URL with WebImageCellValue HOT 2
- Uncaught (in promise): InvalidRibbonDefinition: InvalidRibbonDefinition RichApi.Error: InvalidRibbonDefinition HOT 1
- Missing scopes (scp) in Bearer token from Azure AD HOT 2
- Unable to sideload the example HOT 3
- Word Addin in NET CORE 7.0 with MVC HOT 9
- doc: broken image links on Readme.md of hello-world HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from office-add-in-samples.