question

VinitMaurya-3115 avatar image
0 Votes"
VinitMaurya-3115 asked PhoebeYuan-2983 commented

Trying to get current loggedin user details in word online from add in.

Our organization uses ADFS login so while returning token from office-js, It instead tries to navigate to the adfs server login page from within the add in. Also tried doing the same from my developer account tenant it works/everything works it simply returns the token.

Unsafe attempt to initiate navigation for frame with origin 'https://{<!-- -->{tenantname}}-my.sharepoint.com' from frame with URL 'https://login.microsoftonline.com/{<!-- -->{tenantid}}/oauth2/v2.0/authorize?response_type=id_token%20token&scope=api%3A%2F%2Flocalhost%3A4200%2F1743dd48-98f1-4d7c-b733-0b6ac9414d55%2F.default%20openid%20profile&client_id=57fb890c-0dab-4253-a5e0-7188c88b2bb4&redirect_uri=https%3A%2F%2F{<!-- -->{tenantname}}-my.sharepoint.com%2F_forms%2Fsinglesignon.aspx&state=eyJpZCI6IjkxMjliYzFlLWFiMGUtNGQ5Yi1hNWJkLWNmOWFjMDc1ODZkNiIsInRzIjoxNjM5MDUyNTE3LCJtZXRob2QiOiJzaWxlbnRJbnRlcmFjdGlvbiJ9&nonce=56d25b34-b0c3-47c6-b19c-5fa7d801d918&client_info=1&x-client-SKU=MSAL.JS&x-client-Ver=1.3.2&login_hint={<!-- -->{useremail}}&client-request-id=771384ac-1726-461c-8038-fd380100d5ca&prompt=none&response_mode=fragment'. The frame attempting navigation of the top-level window is sandboxed, but the flag of 'allow-top-navigation' or 'allow-top-navigation-by-user-activation' is not set.

Also facing this error with the above error.

Uncaught DOMException: Failed to set the 'href' property on 'Location': The current window does not have permission to navigate the target frame to 'https://login.microsoftonline.com/{<!-- -->{tenantid}}/oauth2/v2.0/authorize?response_type=id_token%20token&scope=api%3A%2F%2Flocalhost%3A4200%2F1743dd48-98f1-4d7c-b733-0b6ac9414d55%2F.default%20openid%20profile&client_id=57fb890c-0dab-4253-a5e0-7188c88b2bb4&redirect_uri=https%3A%2F%2F{<!-- -->{tenantname}}-my.sharepoint.com%2F_forms%2Fsinglesignon.aspx&state=eyJpZCI6IjkxMjliYzFlLWFiMGUtNGQ5Yi1hNWJkLWNmOWFjMDc1ODZkNiIsInRzIjoxNjM5MDUyNTE3LCJtZXRob2QiOiJzaWxlbnRJbnRlcmFjdGlvbiJ9&nonce=56d25b34-b0c3-47c6-b19c-5fa7d801d918&client_info=1&x-client-SKU=MSAL.JS&x-client-Ver=1.3.2&login_hint={<!-- -->{useremail}}&client-request-id=771384ac-1726-461c-8038-fd380100d5ca&prompt=none&response_mode=fragment&iframe-request-id=68b61e4a-731c-44a5-ae1e-2af1a37b2400'. at https://login.microsoftonline.com/{<!-- -->{tenantid}}/oauth2/v2.0/authorize?response_type=id_token%20token&scope=api%3A%2F%2Flocalhost%3A4200%2F1743dd48-98f1-4d7c-b733-0b6ac9414d55%2F.default%20openid%20profile&client_id=57fb890c-0dab-4253-a5e0-7188c88b2bb4&redirect_uri=https%3A%2F%2F{<!-- -->{tenantname}}-my.sharepoint.com%2F_forms%2Fsinglesignon.aspx&state=eyJpZCI6IjkxMjliYzFlLWFiMGUtNGQ5Yi1hNWJkLWNmOWFjMDc1ODZkNiIsInRzIjoxNjM5MDUyNTE3LCJtZXRob2QiOiJzaWxlbnRJbnRlcmFjdGlvbiJ9&nonce=56d25b34-b0c3-47c6-b19c-5fa7d801d918&client_info=1&x-client-SKU=MSAL.JS&x-client-Ver=1.3.2&login_hint={<!-- -->{useremail}}client-request-id=771384ac-1726-461c-8038-fd380100d5ca&prompt=none&response_mode=fragment:87:326 at https://login.microsoftonline.com/{<!-- -->{tenantid}}/oauth2/v2.0/authorize?response_type=id_token%20token&scope=api%3A%2F%2Flocalhost%3A4200%2F1743dd48-98f1-4d7c-b733-0b6ac9414d55%2F.default%20openid%20profile&client_id=57fb890c-0dab-4253-a5e0-7188c88b2bb4&redirect_uri=https%3A%2F%2F{<!-- -->{tenenantname}}-my.sharepoint.com%2F_forms%2Fsinglesignon.aspx&state=eyJpZCI6IjkxMjliYzFlLWFiMGUtNGQ5Yi1hNWJkLWNmOWFjMDc1ODZkNiIsInRzIjoxNjM5MDUyNTE3LCJtZXRob2QiOiJzaWxlbnRJbnRlcmFjdGlvbiJ9&nonce=56d25b34-b0c3-47c6-b19c-5fa7d801d918&client_info=1&x-client-SKU=MSAL.JS&x-client-Ver=1.3.2&login_hint={<!-- -->{useremail}}&client-request-id=771384ac-1726-461c-8038-fd380100d5ca&prompt=none&response_mode=fragment:87:330

Thanks and Regards

office-addins-devoffice-js-dev
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Have you tried SSO?


0 Votes 0 ·

0 Answers