SharePoint

#22

Hello Rudravas.
I don’t believe what “I don’t require any username / pwd to access the SP site.” because every microsoft account have login and password, if your site is public why you wrote (http://teams.xxxx.com/), so this url is not full, look example. I can’t testing SP without login and password, I don’t have public SP, maybe you need create credential for your site.

Have a nice day.

0 Likes

#23

I have MFA in my Sharepoint, and my Share point session features error “: Cannot contact web site ‘https…/’ or the web site does not support SharePoint Online credentials. The response status code is ‘Forbidden’. The response headers are 'X-SharePointHealthScore=0…”.

How can I solve this problem?

0 Likes

#24

Hello Leo. This activiti dosn’t working with MFA. You can create new user for bot and disable MFA for bot_user. Have a nice day.

0 Likes

#25

I’m able to successfully upload a text file to my target document library but the output parameter for LinkPath is always null. I’m uploading to SharePoint Online. Any idea why the LinkPath isn’t returned?

0 Likes

#26

Do we have any activity for getting list of the files in a sharepoint folder?

1 Like

#27

Hey Tyler can you share your example? I am having a hell of a time trying to get this thing to work. Can anyone show the full steps? I am assuming we start with Convert string to secure, sharepoint session then, upload?
Thanks,
John

0 Likes

#28

John, I’ll list the steps it is pretty straightforward once I had it figured out.

  1. You are correct, you’d start with converting string to secure (or another method of getting your PW as a SecureString).
  2. You’ll then need to use the “Share point session” activity to initialize a “ClientContext” variable (for the “Upload” activity to use). I entered the url for my site collection as the “UrlPath” value, my email address used to access SP for the “UserName” value, and the secureString variable that was already created as the “UserPassword” value.
  3. Last you’ll use the “Upload” activity. Use the ClientContext variable you created as the “ClientContextSession” value, the name of the document library as the “LibraryName”, the path to the file you wish to upload as the “LocalPath”, and for the “PathToFolder” value I used the relative path of the document library that I named to upload the file to.

Interestingly, I had to go back through and recreate this (I’ve moved on to using the Graph API as I also want to populate metadata in the columns of the item) to answer your question and my LinkPath variable appears to work properly now. Not sure what I did differently this time though…

Hope this helps!

0 Likes

#29

Hi @jboli48867,
You can try the other approach to upload the files to sharepoint using invoke code
with help of the Assembly microsoft.sharepoint.client

check the sample for further deep dive
Upload_share_point (2).zip (3.0 KB)

In the above sample am using different ways to uploading a file

  1. SaveBinaryDirect method on the Microsoft.SharePoint.Client.File class
    benefits
  • No file size limits. Time-out occurs after 30 minutes.
  • Only use this method if you’re using a user-only authentication policy. A user-only authentication policy is not available in a SharePoint Add-in, but can be used in native device add-ins, Windows PowerShell, and Windows console applications.
  1. ContentStream property on the FileCreationInformation class.
    Disadvantages
  • file size limits.Upto 256 Mb
  • Recommended for,SharePoint,ServerSharePoint Online
  1. Content property on the FileCreationInformation class.
    Disadvantages
    Maximum file size that can be uploaded is 2 MB. Time-out occurs after 30 minutes.

Get the list of Files and Folder names from Share_point

Get List_of_files_and_folder_name_from_sharepoint.zip (2.8 KB)

Dependencies

  1. Microsoft.sharepoint.client.dll
  2. Microsoft.sharepoint.client.runtime.dll

Regards
Sanjay Shankhla

0 Likes

#30

I am trying to use sharepoint activity to download files.
Sharepoint session activity give me error “The ‘username’ argument is invalid”
user name is a string variable. I am not sure what is wrong with it.

0 Likes

#31

@Gowtham_M does you workflow run with no issues if you type in the user between quotation marks? (hard coded value)

image

0 Likes

#32

Looks like i need to give @domainname.com along with username.
now i am getting another error which says “IDCRL response header from server is not valid”

0 Likes