1

My problem is simple and i was expecting to get a simple solution too. Instead, i already spent days looking of the reason why i get this error and possible solutions.

Setup:

Scenario 1:

  • Created the very basic project from VS with the OTB sharepoint-hosted app. There is a simple call to get the identity of the login user, and i added an extra call to read from existing SP list.
  • I give manage rights to web scope
  • Deploy the app from VS to my on-premise server, trust the app... and then i am asked to login.
  • If i try accessing my app page from a different browser i will be asked to login to my app again.
  • If another user opens the app he will be prompt to enter his credentials too.

 

Scenario 2:

  • All steps like scenario 1

  • Add a new ClientWebPart

  • Deploy from VS, trust the app and without logging in to the app, add it inside an existing page. Will get a x-frame-option=Sameorigin.

  • If I login to the app and then re-load the page hosting the app everything is fine and the app is fully functional.

    Is this normal that all users must login to the app before they are able to use it? Can anyone identify what am i doing wrong ?

I can find many resources explaining how to setup and configure the apps for development but cant find anything clear about simple deployment. Needless to say that the exact same dev proceedures for sharepoint online works flowlessly.

2 Answers 2

2

It depends on which authentication you have configured. NTLM in Sharepoint 2013 uses claims based authentication wich is different from classic used in SP2010. Only IE would not require password if your app domain is listed in local intranet zone, other browsers do require to enter credentials.

You can get more info here (video under windows auth explains how IE sends credentials)

7
  • thanks for the resource. So with 2 words, are u saying that Sharepoint-Hosted apps always require users to login before they can use the app (in Chrome and FF)? If yes, this sounds very intrusive for the users and definitely this is happening only on the on-premise version. I dont have this login problem when deploying apps on the online Sharepoint. Oct 9, 2014 at 9:23
  • Based on this link sysadminspot.com/windows/… it seams that Chrome behaves same as IE and Firefox can be configured. So my mistake to say IE only supports credential sending.
    – malibeg
    Oct 9, 2014 at 10:50
  • Isn't there any other configuration on the Sharepoint side that I can do in order for the app to use the logged in user and not the asking for teh credentials again. It sound strange that I will have to ask all user to go through the process from the url you send me in order to use the portal. Oct 9, 2014 at 12:53
  • You can add your domains to trusted sites with group policy. See this link sharepointassist.com/2009/08/31/… . And for Firefox there is script sivel.net/2007/05/firefox-ntlm-sso
    – malibeg
    Oct 9, 2014 at 13:53
  • Only the PCs that are inside my domain will get the policy. The site is accessible via a public ip from any PC. Users are able to access from any PC that they might not be able to make changes on the browser. Are u saying that those users will not be able to access the apps ? Oct 10, 2014 at 5:56
0

I know it's a very old question, but I will add something that would've helped me:

For automatic login using NTLM / Windows Integrated Authentication with Edge and Chrome as of 2022, you can set the "AuthServerAllowlist" policy, see this other Stackexchange thread. This was needed for our SharePoint-hosted app domain.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.