SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a situation where I need to retrieve the site title for a site in another web application using client side scripting.

Client site JQuery SOAP calls to the "Webs" web service returns the title as expected for URL's belonging to the web app from which I am making this call. However the same call using a URL from another web app returns 401 errors (unauthorized).

I really don't want to deploy a feature to do this and my goal is to make this all client side.

I have not attempted yet to use the client side api in fear I may run into the same problem so I wanted to post here to see if anyone has thoughts or ideas on how to make this happen.

Thanks for reading!

share|improve this question

Thanks for confirming that for me Vardhaman. It seems possible however to use the Search Service Web service call with a query like this.

 var queryText = "<QueryPacket xmlns='urn:Microsoft.Search.Query' Revision='1000'>"
                    queryText += "<Query>"
                    queryText += "<Context>"
                    queryText += "<QueryText language='en-US' type='MSSQLFT'>"
                    queryText += "SELECT Path, Title, Description FROM SCOPE() WHERE Path='" + urlArray[i] +"'"
                    queryText += "</QueryText>"
                    queryText += "</Context>"
                    queryText += "</Query>"
                    queryText += "</QueryPacket>";

This returns the following XML which contains all the info I want. I have to assume I will always get one result.

<ResponsePacket xmlns="urn:Microsoft.Search.Response">
        <Document xmlns="urn:Microsoft.Search.Response.Document">
          <Properties xmlns="urn:Microsoft.Search.Response.Document.Document">
share|improve this answer

I am afraid this wont be possible with the JavaScript Client Object Model as it only works withing the current Site Collection. This is implemented to avoid Cross Domain calls.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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