SharePoint Online / Office 365 -- Client Object Model

Hello,
i try to get some Data from the SharePoint Online "Office365" Beta with the Client Object Model. I use an Sample from the MSDN but i always get the Error
"Server was unable to process request. ---> The server was unable to process the request due to an internal error. ...." in Visual Studio 2010.
Following the Code Snip:
ClientContext clientContext = new ClientContext("https://URI.sharepoint.com/");
clientContext.AuthenticationMode = ClientAuthenticationMode.FormsAuthentication;
clientContext.FormsAuthenticationLoginInfo = new FormsAuthenticationLoginInfo("USER", "PASS");
Web web = clientContext.Web;
ListCollection allLists = web.Lists;
clientContext.Load(web);
clientContext.Load(allLists);
clientContext.ExecuteQuery();
Console.WriteLine("{0} ({1})", web.Title, web.Description);
foreach (List list in allLists)
Console.WriteLine("{0} ({1})", list.Title, list.BaseType);

Hi M.Litschke. You should have received a welcome email when you signed up for the Beta that had the community forum link & login details in it. Did you not recieve one?Myles Jeffery | Thinkscape |
SharePoint Online Deployment |
SharePoint Online File Migration Tool

Similar Messages

  • Error in Application.Run(DisplayLoginForm) and Remote Authentication in SharePoint Online Using the Client Object Model

    Hi guys
    I Think that is a simple error, but I don’t have enough knowledge in .NET apps.
    I make an console app that use Remote Authentication in SharePoint Online Using the Client Object Model, that a I downloaded from MSDN.
    This App run ok.
    But when I like to make a Windows From App. This component send me an error in Application.Run(DisplayLoginForm)
    This err msg :
     An unhandled exception of type 'System.InvalidOperationException' occurred in System.Windows.Forms.dll
    Additional information: Starting a second message loop on a single thread is not a valid operation. Use Form.ShowDialog instead.
    Is there any way to use a form inside a windows form?
    Thank in advance
    Ramiro
    Ramiro B

    Hi,
    Based on the error message, please do as following:
    1. Check your code logic below:
    void btn_Click(object sender, System.EventArgs e)
    Thread t = new Thread(StartMyForm);
    t.TrySetApartmentState(ApartmentState.STA);
    t.Start();
    public static void StartMyForm()
    Application.Run(new MyForm(..));
    2.Try to add the following code line in your code.
    Application.Restart();
    If the issue still exists, please provide your requirement and code for a further research.
    Best Regards
    Dennis Guo
    TechNet Community Support

  • Rename a File in a SharePoint document library through Client object model

    Hi,
    How  to Rename a File in a SharePoint document library through Client object model?
    Thanks
    Poomani Sankaran

    Hi,
    According to your description, you want to rename file in the document library using SharePoint Client Object Model.
    Here is a code snippet works well in my environment for your reference:
    static void Main(string[] args)
    string url = "http://sp2013sps/sites/test/";
    ClientContext clientContext = new ClientContext(url);
    Microsoft.SharePoint.Client.List spList = clientContext.Web.Lists.GetByTitle("Documents");
    clientContext.Load(spList);
    clientContext.ExecuteQuery();
    if (spList != null && spList.ItemCount > 0)
    Microsoft.SharePoint.Client.CamlQuery camlQuery = new CamlQuery();
    camlQuery.ViewXml =@"<View> <Query> <Where><Eq><FieldRef Name='LinkFilenameNoMenu' /><Value Type='Computed'>New Microsoft Word Document.docx </Value></Eq></Where> </Query> <ViewFields><FieldRef Name='Title' /></ViewFields> </View>";
    ListItemCollection listItems = spList.GetItems(camlQuery);
    clientContext.Load(listItems);
    clientContext.ExecuteQuery();
    listItems[0]["Title"] = "word.docx";
    listItems[0]["FileLeafRef"] = "word.docx";
    listItems[0].Update();
    clientContext.ExecuteQuery();
    More information about SharePoint Client Object Model:
    http://msdn.microsoft.com/en-us/library/office/ee537247(v=office.14).aspx
    http://www.codeproject.com/Articles/399156/SharePoint-Client-Object-Model-Introduction
    http://www.learningsharepoint.com/2010/07/12/programmatically-upload-document-using-client-object-model-sharepoint-2010/
    Best regards

  • Error while executing script for sharepoint online (office 365) - the remote server returned an error: (503) server unavailable

    error while executing script for sharepoint online (office 365) - the remote server returned an error: (503) server unavailable.
    I am creating many site collections reading records from sharepoint list using powershell in sharepoint online tenant (office 365).
    Few site collections are created and then getting above error so this error record will be skipped then few succeeding record processed then again getting error.
    pattern is like:
    success
    success
    success
    success
    Error
    success
    success
    success
    success
    success
    success
    error
    success

    Hi,
    As it is an online environment, to troubleshoot this issue in an easier way, I suggest you contact Office 365 Support to see if there is any useful information in
    the log files in the server side:
    https://support.office.com/en-us/article/Contact-Office-365-for-business-support-32a17ca7-6fa0-4870-8a8d-e25ba4ccfd4b?ui=en-US&rs=en-US&ad=US
    Best regards
    Patrick Liang
    TechNet Community Support

  • How to Get user profile properties in provider -cloud hosted app in sharepoint online - office 365 using REST API?

    How to Get user profile properties in provider -cloud hosted app in sharepoint online - office 365 using REST API?
    any idea?

    Hi,
    From your description, my understanding is that you want to get user profile properties in provider-hosted app in SharePoint online using REST API.
    Here is sample code for getting user profile properties:
    http://www.vrdmn.com/2013/07/sharepoint-2013-get-userprofile.html
    Here is a blog below about accessing data from the provider-host apps:
    http://dannyjessee.com/blog/index.php/2014/07/accessing-sharepoint-data-from-provider-hosted-apps-use-the-right-context/
    Best Regards,
    Vincent Han
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • How to get sharepoint online (office 365) data in cloud/windows azure (provider) hosted app using Javascript?

    How to get sharepoint online (office 365) data in cloud/windows azure (provider) hosted app using Javascript?
    I wish to retrieve sharepoint online data in html page (hosted in windows azure) using javascript and then need to play with AngularJS

    Hi,
    According to your description, you might want to get data from Office 365 SharePoint Online(also known as host web) and pass to the Provider Hosted App which is hosted
    in Windows Azure site.
    I would suggest you take a look at the links below about accessing data from the host web
     for a quick start:
    https://msdn.microsoft.com/en-us/library/office/fp179927(v=office.15).aspx#SP15Accessdatafromremoteapp_Codeexample
    http://dannyjessee.com/blog/index.php/2014/07/accessing-sharepoint-data-from-provider-hosted-apps-use-the-right-context/
    Aother sample solution for your reference:
    https://code.msdn.microsoft.com/SharePoint-2013-Get-the-0ec36bb6
    Best regards
    Patrick Liang
    TechNet Community Support

  • Is possible to site mailbox email address with different domains in sharepoint online - office 365

    Can I set site mailbox email address with different domains in sharepoint online - office 365?
    For eg I have two dns link with office 365 account - abc.com, xyz.com
    So can i set site mailbox email according  using powershell like follwoing
    New-SiteMailbox –DisplayName "test" -Name "[email protected]" –SharePointUrl $NewlyCreatedsiteurl
    New-SiteMailbox –DisplayName "test" -Name "[email protected]" –SharePointUrl $NewlyCreatedsiteurl

    Hi Biraj,
    From your description, you would like site mailbox to have two email address.
    Since the issue is related to SharePoint online and Exchange online, I'd recommend you contact online support engineer for sufficient resource and more assistance. For your convenience:
    http://community.office365.com/en-us/f/154.aspx
    In addition, I find some information that might be relevant for your reference:
    Quotes from
    https://support.office.com/en-sg/article/Prepare-for-using-site-mailboxes-in-Office-365-6381daa5-3d98-4629-972d-d19e1dc48c1b
    Can I rename a site mailbox?            
    The display name of a site mailbox is the SharePoint team site display name. If you change the display name of the site in SharePoint, the display name also changes in Outlook. However, the site email address won’t be changed.
    Regards,
    Rebecca Tu
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • How to change Site Share mail template in SharePoint online (Office 365)

    Hi,
    I want to change the default mail template used in SharePoint Online (Office 365) which is as follows
    I want to change the logo of microsoft with my custom logo and message below that logo.
    How could i do that?

    in Office365 SharePoint Online, if you wan to customize the alert template you need to customize the Alerttemplates.xml under 14 folder on Online server, but it is not permitted, check this article you
    also have seen.
    You can also post this question related SharePoint Online in dedicated Office365 SharePoint Online forum, you can get a better assistance there,
    http://community.office365.com/en-us/forums/151/categories.aspx
    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/0d31bb5d-d46b-425a-9f48-6100404b95d8/sharepoint-online-custom-alert-emails?forum=sharepointcustomizationprevious

  • How to install app using powershell in sharepoint online - office 365?

    How to install app using powershell in sharepoint online - office 365?

    Hi
    check this similar post
    https://social.msdn.microsoft.com/Forums/sharepoint/en-US/1f0cd45a-00e1-4452-bafe-83c6ee3a59db/can-i-deploy-a-sharepointapp-to-office-365-using-powershell?forum=appsforsharepoint
    Romeo Donca, Orange Romania (MCSE, MCITP, CCNA) Please Mark As Answer if my post solves your problem or Vote As Helpful if the post has been helpful for you.

  • Lotus notes migration to SharePoint online Office 365

    Hi there,
    My organization is looking to migrate from Lotus notes to SharePoint Online Office 365 (SharePoint 2013).
    We are doing this without any help of a tool.
    I am going to create the wiki pages.
    There are around 1600 pages which are interlinked and approximately 15 links on every page.
    Is there any means I can automate the linking of wiki pages.
    Can a workflow be written to do so..??
    Please advise
    Many thanks.

    Yes, this can be automated. However in doing so you're effectively building your own tool which will cost more than buying a pre-built one.
    This isn't going to be possible with a SharePoint workflow. First you'll have to read the Lotus notes content, then you'll want to serialise that into a format for import and clean up any links or dead pages. Then you'll have to use the CSOM or REST
    APIs to create, populate and publish those pages.
    This won't be a quick task.

  • Any way to get all users's user profile proeprty using CSOM c# for sharepoint online - office 365?

    Any way to get all users's user profile proeprty using CSOM c# for sharepoint online - office 365?

    Since CSOM provides methods for operations related to people per
    user scope, you could retrieve all site users first using SP.Web.siteUsers
    property. and then use SP.UserProfiles.PeopleManager.getUserProfilePropertyFor
    Method to get property.
    [custom.development]

  • Remove/hide "new item or edit this list" link of sharepoint online (office 365) with csom

    as title, I delevelop an app for sharepoint online, so I must use client api to operate sharepoint object. now, i need to remove/hide the link “new item or edit this list”, not use js do it, what can i do? help!!

    Hi,
    Per my understanding, you might want to remove the link “new item or edit this list” of a list view web part using Client Object Model.
    As there is no such property in
    WebPart object can be used to hide/remove the link, I suggest you apply custom CSS style to the page which contains the list view
    web part to hide it.
    Best regards
    Patrick Liang
    TechNet Community Support

  • How to execute XML batch commands using SharePoint Web services or Client Object Model

    Hi,
    I have a requirement to execute some batch commands to update SharePoint View Style, how can i do it using SharePoint webservices or SharePoint Client Object model.
          I need to execute the following Batch command over a particular web.
    <Method ID="UpdateView">
      <SetVar Name="Cmd">UpdateView</SetVar>
      <SetList Scope="Request">{GUID of List}</SetList>
      <SetVar Name="View">{GUID of View}</SetVar>  
      <SetVar Name="ViewStyle">6</SetVar>
      <SetVar Name="RowLimit">100</SetVar>
      <SetVar Name="Paged">TRUE</SetVar>
    </Method>

    Hi
    I tried it already... But UpdateView Method in the Views.asmx and Lists.asmx, both are not supporting for updating the style of the view (like Boxed, Newsletter...).
    If you have any code sample which will do this job with any of the SharePoint web services, please share it..

  • Is Office Home and Business 2013 fully compatible with Sharepoint Online (Office 365)?

    My client recently upgraded 3 Windows 7 PCs (2-32 & 1-64-bit OS) from Office 2007 32-bit (which was actually working fine against Exchange/SharePoint Online) to Office Home and Business 2013 (32-bit)
    Now, for all 3 PCs, while Office 2013 Word/Excel can open, check out/in, and save SharePoint Online files, there is ALWAYS a 2 minute delay in closing the file which is apparently waiting for the Local Security Authority call to return. This seems
    to indicate an issue related to SharePoint security on the client side.
      Problem Event Name: AppHangXProcB1
      Application Name:        
    WINWORD.EXE
      Application Version:    
    15.0.4657.1000
      Waiting on Application Name: 
    lsass.exe:lsasspirpc
    This is the Local Security Authority Security Support Provider Interface Remote Procedure Call (LSA SSPI RPC)
    My client has 66 licenses for SharePoint Online (Plan 2) and 73 Exchange Online (Plan 1) "stand alone" services. The same failure is happening on 3 Win 7 PCs. All of which I've carefully reviewed against the MS Office trouble shooting guides (start
    Windows OS w/out non-MS services, Word/Excel safe mode w/out add-ons, O365 readiness checks, Office repair, etc.). We have PCs running Win 7 (32 & 64-bit) w/Office 365 ProPlus & Office Professional Plus 2013 that work fine. it's JUST these 3 Win 7
    PCs that were upgraded from Office 2007 to Office Home and Business 2013 that have the 2 min. SharePoint file close time.
    Can you please confirm that Office Home and Business 2013 is compatible w/SharePoint Online
    at least for Excel and Word?
    The "slow close" problem can be demonstrated on multiple site collections/sub sites and w/Excel & Word docs in doc libs and lists
    After many hours capturing information, following the MS Office trouble shooting guides, and repairing the Office install, I've had no luck in resolving this.While Word/Excel will eventually close SharePoint Online files after about
    2 minutes, this is certainly unacceptable. Otherwise, locally stored files close normally and new files were created by the Office 2013 Excel/Word for this testing.
    Any thoughts or guidance would be appreciated.  

    Hi raygabe,
    I couldn't find the document mentioned there is any compatibility between Office365 SharePoint online and Office Home and Business 2013 version, I would recommend that you check if the issue could be reproduced on other Win7 machines installed with Office
    Home and Business 2013 installed directly instead of upgrading from Office2007, see if issue is related to Office application upgrade.
    I also recommend that you post this issue on our dedicated Office365 SharePoint online forum and Office 2013 forum for a better assistance with more experts regarding this issue from the following links.
    http://community.office365.com/en-us/f/154.aspx
    https://social.technet.microsoft.com/Forums/office/en-us/home?category=officeitpro
    Thanks,
    Daniel Yang
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you havefeedback for TechNet Subscriber Support, contact [email protected] 
    Daniel Yang
    TechNet Community Support

  • Connecting Exchange On-Premise to SharePoint Online (Office 365)

    Hi,
    Help, please.
    I’m running MS Exchange 2010 SP3 On-Premise and now I’m planning to deploy SP2013 in Office 365.
    How can I connect both? What are my options?
    Thanks in advanced.

    Users can connect to SharePoint calendars has no tie to Exchange. Your users will not be able to receive notifications from tasks, workflows, and so on. You will need to have Exchange Online and either set up hybrid Exchange (where you route mail
    that cannot be delivered online to your on-prem implementation), or move users into Exchange Online.
    Trevor Seward
    Follow or contact me at...
    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.
    Thank you very much Trevor. Now I have a starting point …..

Maybe you are looking for

  • Problem with Sap interactive form by Adobe control

    Hi, I'm using NWDS version 7.0.21  . I downloaded and installed LiveCycleDesigner 7.1 from service.sap.com  . I restarted my computer. I start NWDS and open an existing WD java project, and i tryed to  add an adobe interactive form control into exist

  • JOIN over 3 tables with 'null' values?

    Hello all, I would like to join data from 3 tables, whereas from the 3rd table I just wanna join 2 columns, if a condition is met. otherwise those 2 columns should be NULL. The following statement works, but only shows me the rows where all condition

  • T530 - Disable Optimus in BIOS (choose Discrete) -- computer will not Suspend (only Hibernate)

    Found a strange power management problem today.  I disabled Optimus in the BIOS of my T530 recently, setting the video to "Discrete".  I later noticed that my computer no longer went to Sleep mode when I closed the lid, but instead Hibernated.  I dou

  • ITSM VAR: Send an e-mail when manually dispatching incidents

    Hello Guys, we are currently implementing Solution Manager 7.1 SP11 ITSM with VAR scenario. We have succesfully configured "auto support team determination + mail to support team" for the inital dispatching when new messages are created. What we now

  • Mavericks - sound problems in QuickTime

    After installing the OSX Mavericks when watching video in the player is dealt crackling noise. In the other players and in Preview the sound is normal. My devices: iMac (in late 2012) 2,9 GHz Intel Core i5, 8Gb 1600 MHz DDR3, soundcard (Firewire-Thun