0

Running into a conundrum, and was hoping someone may be able to assist.

At work, I want to send an email to a group of people. These people provide source data to my organization, and deliver their data through SharePoint Site folders. While the email needs to go to multiple people, not every recipient should have access to each folder. A handful of the recipients need access to a single folder, and another handful needs access to another folder, but recipients should only be able to access their designated folder.

Normally, I would modify each folder like this... enter image description here

However, since our office needs this data more than once per year, we are attempting to automate this workflow to run several times a year, where a new series of folders is created for each section of the year, with a new link per folder.

The furthest I have been able to get so far is below. I entered ellipsis where there was potential for organizational risk, but the general path should be fairly clear.

library(Microsoft365R)

..._team <- get_team("...")

..._sharepoint <- ..._team$get_sharepoint_site()

..._documents <- ..._sharepoint$get_drive("Documents")

..._test_folder <- ..._documents$get_item("Test_Auto_email_sharepointLinks/Test")

link1 <- ..._test_folder$create_share_link(scope = "organization")
link1
[1] "https://.../:f:/s/.../Erf_vG...TtAhK...UBJC...PSfik5kf9ms...w"

While this process work internally, I have not been successful yet in creating individual specific links to persons external to the organization. Given the flexibility within Microsoft365R, it seems like something that should be possible.

Tried changing the scope to anonymous, but that would end up granting anyone with the link access, not providing access to specific individuals.

If anyone has any insight into this problem, it would be greatly appreciated. Various online resources, do not seem to provide a solution, so this is kind of my last attempt before moving on to a different method / manual method.

James Crumpler
  • 192
  • 1
  • 8

0 Answers0