Reputation: 239
I am trying to host a javascript application written in angular which talks with Microsoft graph api, inside excel javascript add-in.
Application is hosted properly inside excel -add-in.
But when I call login method I get below error Refused to display 'https://login.microsoftonline.com/common/oauth2/v2.0/authorize?client_id=1e…20directory.readwrite.all%20contacts.readwrite%20files.readwrite.appfolder' in a frame because it set 'X-Frame-Options' to 'DENY'.
How can I fix this?
Upvotes: 1
Views: 307
Reputation: 2035
The login page cannot be hosted inside a frame / add-in directly. You need to create a popup window that hosts the login screen, and then sends the access token back to the add-in after the user has completed the sign-in process.
There are more details about how to do this on this MSDN topic: Use the OAuth authorization framework in an Office Add-in.
Upvotes: 3