Unattended on-premise web application authentication with SharePoint Online not working

%3CLINGO-SUB%20id%3D%22lingo-sub-1107034%22%20slang%3D%22en-US%22%3EUnattended%20on-premise%20web%20application%20authentication%20with%20SharePoint%20Online%20not%20working%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1107034%22%20slang%3D%22en-US%22%3E%3CP%3EHello%2C%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3CP%3EWe%20are%20using%20an%20on-premise%20web%20application%20that%20uses%20these%20SharePoint%20web%20services%3A%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3CP%3ECopy.asmx%2C%20Dws.asmx%2C%20Lists.asmx%20and%20Webs.asmx%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3CP%3Eto%20access%20SharePoint%20to%20enumerate%20sites%2Ffolders%20and%20upload%2Fdownload%20documents.%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3CP%3EThe%20web%20application%20runs%20in%20a%20pool%20under%20a%20user%20account%20on%20one%20of%20our%20on%20premise%20servers.%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3CP%3EWe%20supply%20credentials%20for%20a%20user%20to%20the%20web%20services%20-%20for%20the%20record%20this%20user%20account%20is%20also%20synced%20to%20Office365%20and%20is%20enabled%20to%20access%20our%20SharePoint%20Online%20site.%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3CP%3EOur%20initial%20tests%20use%20Webs.asmx%20and%20at%20first%20resulted%20in%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3CP%3EServer%20was%20unable%20to%20process%20request.%20---%26gt%3B%20Access%20is%20denied.%20(Exception%20from%20HRESULT%3A%200x80070005%20(E_ACCESSDENIED))%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3CP%3EAt%2018%3A55%20on%20the%2013%3CSUP%3Eth%3C%2FSUP%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3CP%3EWe%20then%20altered%20our%20dll%20to%20add%20the%20following%20request%20header%20to%20the%20Webs.asmx%20web%20request%20(recommended%20for%20mixed%20authentication)%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3CP%3Erequest.Headers.Add(%22X-FORMS_BASED_AUTH_ACCEPTED%22%2C%20%22f%22)%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3CP%3Ebut%20then%20got%3A%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3CP%3EThe%20request%20failed%20with%20HTTP%20status%20401%3A%20Unauthorized.%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3CP%3EAt%2020.44%20on%20the%2013%3CSUP%3Eth%3C%2FSUP%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3CP%3EAny%20ideas%3F%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1107034%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3ESharePoint%20Online%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Occasional Contributor

Hello,

We are using an on-premise web application that uses these SharePoint web services:

Copy.asmx, Dws.asmx, Lists.asmx and Webs.asmx

to access SharePoint to enumerate sites/folders and upload/download documents.

The web application runs in a pool under a user account on one of our on premise servers.

We supply credentials for a user to the web services - for the record this user account is also synced to Office365 and is enabled to access our SharePoint Online site.

Our initial tests use Webs.asmx and at first resulted in

Server was unable to process request. ---> Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))

At 18:55 on the 13<sup>th</sup>

We then altered our dll to add the following request header to the Webs.asmx web request (recommended for mixed authentication)

request.Headers.Add("X-FORMS_BASED_AUTH_ACCEPTED", "f")

but then got:

The request failed with HTTP status 401: Unauthorized.

At 20.44 on the 13<sup>th</sup>

Any ideas??

0 Replies