Access SharePoint Online Data through code/powershell

Hi All,<o:p></o:p>
I need to access SharePoint Online site to upload documents from local machine to the doc libraries on the site.. (100s of docs)
I am trying to see if I can use PowerShell script for this..  However, I see that SharePoint Online Management Shell cmdlets are not robust enough to do such operations..  Is there a way I can use CSOM / .net console app / any other way.. I am drawing
blank here.. L<o:p></o:p>
Any help is much appreciated.<o:p></o:p>
Charan

You can start from here
http://blogs.technet.com/b/fromthefield/archive/2014/02/19/office365-script-to-upload-files-to-a-document-library-using-csom.aspx
Regards Chen V [MCTS SharePoint 2010]

Similar Messages

  • How to get Client ID and Client Secret for Office App for Word which accessing SharePoint Online

    we currently implementing an Office App for MS Word which access SharePoint list and get data from lists. Our aim is any user can get this app from Office App store and enter their SharePoint URL and browse their own SharePoint lists and use those. When
    I was checking mechanisms which you used to access SharePoint, in some of them have used ClientId and Client Secret to authenticate with SharePoint. I have following questions.
    1.If I want to sell my app using Office app store where can I get those clientId and client secret which is used to  get the access tokens.
    2.Is it possible to create SharePoint app and publish it to SharePoint app store and get clientId and client secret and use it when accessing through office. So users first download our SharePoint app install it to their SharePoint environment then get out
    Office App from Office app store and add it to word. Will this work?

    Hi,
    >> We are planning to develop an Office app to access SharePoint Online and SharePoint on Premise from Microsoft word.
    I’m not very familiar with SharePoint development, so please correct me if I have any misunderstandings about your requirement.
    The basic components of an app for Office are an XML manifest file and the default webpage of your app (server side).
    >> If I'm publishing my Office App for Word in to the Microsoft office app store, how do I get the ClientId and ClientSecret which I need to pass to authenticate with SharePoint online?
    As far as I know, when register your web app to SharePoint Online, you will get the ClientId and ClientSecret from the Azure Active Directory. And you need to store the Client ID and Client
    Secret on the app server side.
    For details, you could reference the article
    Building an Office 365 ASP.NET MVC app.
    >> If ClientId and ClientSecret not providing when we publishing Word Office App to the app store how what the ways which we can use to authenticate with SharePoint using Word Office app?
    You don’t need to provide the ClientId and ClientSecret when publishing your App to App Store. They are stored on your app server side.
    By the way, if you have the question about how to access the SharePoint resource in a Web Application, I will suggest you posting the questions to
    SharePoint Development Forum. For this forum, we mainly discuss the questions about using the Office JavaScript API to develop Apps for Office.
    Regards,
    Jeffrey
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Accessing Party EDI details through code in 2013

    Hi,
    We are looking at options of accessing the Party EDI details from orchestration in BTS 2013 R2. But looks like the property X12Receiver belonging to the partner object  Microsoft.BizTalk.Edi.PartnerAgreementManager.Partner
    has been deprecated. Although, using the property does not give a compilation error, it throws exception during runtime with the below error:
    System.Data.SqlClient.SqlException (0x80131904): Could not find stored procedure 'edi_PartnerX12InterchangeSelect'.
    Any pointers on how the accessing of party EDI details through code/within orchestration can be achieved? Appreciate any help on this regards. Thanks.

    Refer "Custom Party Resolution" sample available in the BizTalk SDK -
    http://msdn.microsoft.com/en-in/library/aa559134.aspx and pay specific attention to the code in "PartyResolutionStream.cs". This has the logic for querying the BizTalk Party database tables.
    You can expose you own library/helper with this code and leverage it in the orchestration.
    That having said, if you use the EDI Pipelines, the party resolution is done for you and available on the received message in the orchestration as promoted property. Refer
    http://msdn.microsoft.com/en-us/library/bb226500.aspx
    Regards.

  • How to access sharepoint List Data in Power Pivot model

    Hi,
    I have a sharepoint list and i want to access the list in power pivot workbook.
    I tryed exporting the list as datafeed but iam that is missing under export.
    Iam stuck pls help any other approach.?
    Regards,
    Krishnaa

    Hello,
    I have answered this question in this thread below:
    http://social.technet.microsoft.com/Forums/office/en-US/92a04e1b-a5f7-4dbe-88e7-0a1064622641/sharepoint-list-access-in-power-pivot?forum=sqlkjpowerpointforsharepoint
    Please go through the following aticles:
    Using SharePoint List Data in PowerPivot:
    http://msdn.microsoft.com/en-us/library/hh230322.aspx
    Using a SharePoint List as a data source:
    http://blogs.technet.com/b/excel_services__powerpivot_for_sharepoint_support_blog/archive/2013/07/11/excel-services-using-a-sharepoint-list-as-a-data-source.aspx
    Regards,
    Elvis Long
    TechNet Community Support

  • How to consume the sharepoint online Library data to Excel sheet using ODATA connection. That ODATA connection file resides in "SharePoint Online -Data Connections Library"

    I have created a OData Connection to my Library and published to SharePoint online site.
    To refresh the data, property is set like "Refresh when opening file"
    When I downloaded and open the file, the new data is consumed to me successfully because this ODF file referenced to my local computer
    If any other user downloads the file its not opening as reference file points to my local machine.
    I want to keep this ODF file in "Data connections" Library (or in any site/Library) and establish the connection to the excel sheet. so that any one can use the ODF file.
    or else any other alternative to use ODF file globally and get the SP Library data to excel ?

    Hi,
    it will use the connection in the ADF library. I recommend though that you not save database connect information in the ADF library. Instead:
    - define the ADF BC model to use JDBC data sources
    - In the ADF library, configure it to only contain the data source name
    - In the view project (the workspace) configure the database connection exposed by the library
    When the library is imported, check Application Resources --> Connections and right click on the imported connection name to configure it
    Frank

  • Accessing Blackberry synched data through a desktop PC

    Prior to having my Blackberry Storm 9530, I had a regular cellphone and a Palm Pilot.  One useful feature of the Palm software was that I could access the synched data (contact information, calendar, etc) on my desktop.  While I know how to use the Storm as an extra hard drive, thereby accessing photos and documents, I have not discovered any way to access my calendar, memo pad or contacts.  
    Does anyone know how to do this?   Is there a 3rd party software that will do it, if Desktop Manager won't?  I am concerned about the device crashing.  I may not want to buy another Blackberry device after this one, don't really know yet.  But I want to be able to view my data.
    Can anyone help me?

    Hi and Welcome to the Forums!
    Contrary to how others do things, RIM does not provide a desktop PIM. Others force you to use their PIM and only their PIM. RIM provides a conduit software that functions as a bridge between your chosen PIM and the BB. See this KB for compatible PIM's:
    KB12268 Applications supported by BlackBerry Desktop Manager for synchronization
    You can configure the BB to sync with the PIM:
    KB17022 How to configure organizer applications for synchronization using BlackBerry Desktop Manager
    Good luck and let us know!
    Occam's Razor nearly always applies when troubleshooting technology issues!
    If anyone has been helpful to you, please show your appreciation by clicking the button inside of their post. Please click here and read, along with the threads to which it links, for helpful information to guide you as you proceed. I always recommend that you treat your BlackBerry like any other computing device, including using a regular backup schedule...click here for an article with instructions.
    Join our BBM Channels
    BSCF General Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • Cannot view SharePoint Online documents through CRM Online Outlook Connector - iframe error

    We are integrating CRM 2013 Online with SharePoint 2013 Online. We have installed the CRM List Component solution. We have also modified the SharePoint master page to permit display of SharePoint content in iframes. We can view SharePoint documents within
    CRM using Internet Explorer after setting the Documents link for an opportunity to point to a document set in SharePoint. However we cannot view documents through the CRM Outlook Connector. We receive the error that "This content cannot be displayed in
    a frame".
    We have tried adding *.sharepoint.com, *.dynamics.com, and *.microsoftonline.com to IE's Trusted Zone with no effect.
    The application launched by the Outlook Connector is called Microsoft.Crm.Application.Outlook.WebFormsHost and it's my understanding that it uses the IE engine to render online content.
    Is there anyway to view SharePoint content embdedded in CRM via an iframe with the Outlook Connector?

    I have the same problem here.
    The integration works fine outside of Outlook, but if, for example, an account is opened within CRM for Outlook the error occurs.
    - No masterpage modification
    - Some security setting in IE 11 (perhaps IE 11 is the problem)
    - Installed the solution in the used site collection
    - Configured CRM settings
    Dirk

  • How to access SharePoint External Data column using Silverlight Client Object Model

    Hi Friends,
    I have one sharepoint list which has column of type External Data type. My need is to access each item and get the values from the External Data Type column field.
    Can anyone help me how to acheive this. I am begineer in Silverlight.
    Thanks, Cool Developer

    Hi Friends,
    I have one sharepoint list which has column of type External Data type. My need is to access each item and get the values from the External Data Type column field.
    Can anyone help me how to acheive this. I am begineer in Silverlight.
    Thanks,
    RajanThanks, Cool Developer

  • Retrieve the default content access account for search through code

    Hi there,
           Does anyone have the code to retrieve the default content access account (crawl account) for the MOSS search? I tried looking into Microsoft.Sharepoint.Search.Adminstration.SearchService namespace. It has a "crawlaccount" property but not sure how to initialize it.
    Thanks,
    Kish

    try:
    using Microsoft.Office.Server.Search.Administration;  
    using Microsoft.SharePoint;  
       using (SPSite site = new SPSite("http://basesmcdev2/sites/tester1"))  
                    SearchContext context = SearchContext.GetContext(site);  
                    Content content = new Content(context);  
                    return content.DefaultGatheringAccount;  
    http://www.certdev.com

  • SharePoint Online Iterating through Document Libraries CSOM

    Hi,
    I am trying to iterate though a document library and set each document/items whithin to inherit permissions (at the moment each doc/item is using uniquer permissions).
    I am able to get the specific document library that I am interesting in, however I cannot at the moment iterate though each of the items/documents within it, but here is what I have so far:
    Add-Type -Path "Libraries\Microsoft.SharePoint.Client.dll"
    Add-Type -Path "Libraries\Microsoft.SharePoint.Client.Runtime.dll"
    Add-Type -Path "Libraries\Microsoft.SharePoint.Linq.dll"
    Add-Type -Path "Libraries\Microsoft.SharePoint.dll"
    $webUrl = "https://test.sharepoint.com/sites/testsite"
    $username = "####"
    $password = "####"
    $securePass = ConvertTo-SecureString $password -AsPlainText -Force
    $listname = "TestDoc";
    $ctx = New-Object Microsoft.SharePoint.Client.ClientContext($webUrl)
    $ctx.Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($username, $securePass)
    #variables
    $web = $ctx.Web
    $lists = $web.Lists
    $ctx.Load($lists)
    $ctx.Load($web)
    $ctx.ExecuteQuery()
    #print web URL
    write-host `n "Web Url:" `n $web.Url
    foreach ($list in $lists)
    if ($list.Title -eq "TestDoc")
    #print list name if found
    write-host `n "Found the list:" `n $list.Title `n
    #attempting to iterate through items in the document library
    foreach ($item2 in $list.Items)
    #list the items/documents in the document library
    write-host $item2.Title
    It is the foreach loop I am having trouble at the moment as I am not sure how to loop though each of the items/documents in the document library.
    Any suggestions on the approach I should take would be much appreciated.

    Thanks for the heads up, I have re-worked my script which is simpler and now works like a charm:
    Add-Type -Path "Libraries\Microsoft.SharePoint.Client.dll"
    Add-Type -Path "Libraries\Microsoft.SharePoint.Client.Runtime.dll"
    Add-Type -Path "Libraries\Microsoft.SharePoint.Linq.dll"
    Add-Type -Path "Libraries\Microsoft.SharePoint.dll"
    $webUrl = "https://test.sharepoint.com/sites/testsite"
    $username = "####"
    $password = "####"
    $securePass = ConvertTo-SecureString $password -AsPlainText -Force
    $listname = "TestDoc"
    $ctx = New-Object Microsoft.SharePoint.Client.ClientContext($webUrl)
    $ctx.Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($username, $securePass)
    #get the List/DocLib and load it for use
    $listUpdate = $ctx.Web.Lists.GetByTitle($listname)
    $ctx.Load($listUpdate)
    $ctx.ExecuteQuery()
    #CAML Query to get all items inclusing sub-folders
    $spQuery = New-Object Microsoft.SharePoint.Client.CamlQuery
    $spQuery.ViewXml = "<View Scope='RecursiveAll' />";
    $itemki = $listUpdate.GetItems($spQuery)
    $ctx.Load($itemki)
    $ctx.ExecuteQuery()
    #iterating through the items and reseting permission inheritence
    for($j=0; $j -lt $itemki.Count; $j++)
    $itemki[$j].ResetRoleInheritance()
    $ctx.ExecuteQuery()

  • Using third party service to access Project Online data.

    Hi,
    I have read an article: What's new and what's out for developers in Project 2013. There was a paragraph called "Comparing project server on-premises with Project online".
    In that paragraph it is written (in part about Online Project):
    "Can use the PSI, but not supported: no OAuth and no service-to-service connections."
    Does that mean that I will not be able to connect to Project online account from another service to get data say for analysing on a different resource and after it send it back to Project online?
    Thank you,
    Ruslan

    The only open question is what did they mean writing:
    "Can use the PSI, but not supported: no OAuth and no service-to-service connections"
    That's written about Project online
    Does anyone know the answer?
    Thank you

  • Access 2010 Linked to Sharepoint online - avoid direct access to sharepoint stored data

    Hello,
    I have an access 2010 application (front end)  connected to SharePoint online team site (as back end).
    I wish to allow my users to work with the front end but to avoid direct access to the data on SharePoint Online.
    The user will open the access application and it will auto connect & work with SharePoint online.
    How can I implement this?
    Thank you for your help

    Hi,
    According to your description, my understanding is that you want to use Access 2010 to connect the SharePoint Online data.
    In Access 2010, you can connect the SharePoint list as a external datasource like the capture below. It will need to input url and user credentials to access SharePoint site in the wizard. If you want to connect automatically, you will need write some custom
    Micro code to achieve it.
    If you have some question about Micro code to connect SharePoint list automatically, I suggest you can create a new thread in Access Development, you will get more detailed information from there.
    https://social.msdn.microsoft.com/Forums/office/en-US/home?forum=accessdev
    Thanks
    Best Regards
    Jerry Guo
    TechNet Community Support

  • Powershell Error for SharePoint Online -"The remote server returned an error: (407) Proxy Authentication Required."

    I am trying to call sharepoint online from powershell. Below is the code. I get 
    Exception calling "ExecuteQuery" with "0" argument(s): "The remote server returned an error: (407) Proxy Authentication Required."
    $loadInfo1 = [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint.Client")
    $loadInfo2 = [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint.Client.Runtime")
    $webUrl = "ZZZZ"
    $username = "XXX"
    $password = "YYYY"
    $ctx = New-Object Microsoft.SharePoint.Client.ClientContext($webUrl) 
    $ctx.Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($username, $password)
    $web = $ctx.Web
    $lists = $web.Lists 
    $ctx.Load($lists)
    $ctx.ExecuteQuery()
    $lists| select -Property Title
    Raj-Shpt

    Hi,
    About how to access SharePoint online site using PowerShell, the blog below would be helpful:
    http://social.technet.microsoft.com/wiki/contents/articles/29518.csom-sharepoint-powershell-reference-and-example-codes.aspx
    Another two demos for your reference:
    http://www.hartsteve.com/2013/06/sharepoint-online-powershell/
    http://www.sharepointnutsandbolts.com/2013/12/Using-CSOM-in-PowerShell-scripts-with-Office365.html
    Thanks
    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

  • Using sharepoint designer 2013 - connected to sharepoint online - but getting " data source file cannot be saved" after making a new linked datasource

    using sharepoint designer 2013 - connected to sharepoint online - but getting " data source file cannot be saved" after making a new linked datasource

    Hi,
    Based on your description, I have done a test and I can’t reproduce your issue.
    I have used SharePoint Designer 2013 to open a SharePoint Online site and there are no issues.
    I’d like to clarify whether you encounter any issues when accessing SharePoint Online sites. If there are no issues during the accessing procedure, SharePoint Online service should be working fine at your side. The issue may be caused by specific SharePoint
    Designer client or network. I suggest you refer to the following steps to troubleshoot the issue.
    1. Use SharePoint Designer to open another site and check whether it is successful.
    2. When you are prompted to enter Office 365 account and password, try other users’ accounts and select the remembering the credential.
    3. Perform the connection procedure under another environment and verify whether the issue is resolved.
    If the issue persists, can you provide related screenshots for further troubleshooting?
    Best Regards,
    Lisa Chen
    Lisa Chen
    TechNet Community Support

Maybe you are looking for

  • How do I get the Windows 8.1 Mail/Calendar/People apps to connect to my company's Exchange server?

    I have a Surface Pro 2 on my organization's domain, and while I have Outlook 2013 running fine on the desktop side, I'd really like to connect the Mail, Calendar, and People apps to my work Exchange account if possible. First, a little background on

  • Can I change layer order in PDF?

    Acrobat 9 pro: I'm doing a complicated map with layers in PDF format. I found a merge command to merge layers, which is cool. But better option for me is to change layer order, and possibly create new folders within PDF. Is this possible with Acrobat

  • X300: External Monitors and port replicator

    The X300 looks really good, but when not traveling I'd be using it with a 24" 1920x1200 monitor. A couple questions I can't see to find answers for: 1)  Is the X300 capable of driving that resolution for an external monitor? 2)  Assuming a good answe

  • Acrobat X De-select snapshot tool

    Hi, Could anybody tell me how to *stop* taking snapshots once the snapshot tool has been selected? Once I click it, how do I go back to the standard paragraph selecting tool? Apologies if this is obvious... Thanks.

  • StarOffice 8 / Linux

    We work with StarOffice on Linux boxes since version 5. We upgraded from 5 to 6 to 7 and now to 8. Version 8 with and without patch creates us a lot of troubles : freezes with some worksheets, closes on printing (every time we sent a crash report)...