-
Notifications
You must be signed in to change notification settings - Fork 48
drv$list_shared_items()
returns list of ms_object
and not list of ms_drive_items
#206
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I think you just sent this via a reply to the email, but just an FYI this
didn't update as a comment on the GitHub issue itself:
#206
…On Tue, Apr 2, 2024 at 2:51 PM dcomputing ***@***.***> wrote:
The public version 2.4.0 does not return a list of ms_drive_items as per
NEWS: The list_shared_items()/list_shared_files() method for drives now
always returns a list of drive item objects
https://cran.r-project.org/web/packages/Microsoft365R/news/news.html
<http://url>
As seen in the 2.4.0 version of the function below, it returns a vector
based on the drive item objects and this causes all code depending on a
list of drive item objects from list_shared_items() to fail since drive
item object functions are no longer available. Whatever happened to issue
#189 <#189> which is
supposed to fix this problem?
list_shared_items=function(allow_external=TRUE, filter=NULL, n=Inf,
pagesize=1000, info=NULL)
{
if(!is.null(info) && info != "items")
warning("Ignoring 'info' argument, returning a list of drive items")
opts <- list(`$top`=pagesize)
if(allow_external)
opts$allowExternal <- "true"
if(!is.null(filter))
opts$`filter` <- filter
children <- self$do_operation("sharedWithMe", options=opts, simplify=FALSE)
# get file list as a data frame, or return the iterator immediately if n is NULL
out <- extract_list_values(self$get_list_pager(children), n)
names(out) <- sapply(out, function(obj) obj$properties$name)
out
}
—
Reply to this email directly, view it on GitHub
<#206 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHPO7L6UPIYYQC7O6RPXMPTY3L427AVCNFSM6AAAAABFJS3SPKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMZSHAYTMNZZHE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Sorry, I deleted the comment I had posted. The code I was dealing with depended on the previous data frame table that had the properti isDir set. I have yet to work out how to handle 2.4.0's list_share_items output. I thought I could call the ms_drive_item's is_folder function but as you say, it is not a list of ms_drive_items. |
Experiencing this issue as well, has a workaround been proposed yet? |
@mstackhouse I have also come across this issue, which is preventing me from accessing files which are shared with me. @eitsupi , @r-ash , @datawookie , @msberends and @stephenashton-dhsc , I hope one or more of you will be able to help as contributors to this package and currently active GitHub members. It seems that @hongooi73 , the main contributor of this package, has been inactive for over a year and as a result open issues including this one have been piling up. When you have a free moment, please can you take a look at some of the recent issues including this one and see if we can resolve them? My experience in building/maintaining packages and time is limited, but I am happy to offer my assistance. Thank you. |
Sure, I’d like to help - but if @hongooi73 is not available to merge PR’s, how will this package progress? Including releases on CRAN? |
I probably won't be able to provide too much support - whilst I am reasonably okay with package development, I'm not skilled enough with the underlying API interface. For package progress, I'm assuming that @hongooi73 or someone within the Azure organisation will have to change permissions to allow for a wider number of individuals to merge PRs. For releases on CRAN, I believe the standard process is for the current author to email CRAN formally passing authorship to another named individual. |
Thank you @msberends and @stephenashton-dhsc for your quick responses. I am not sure who the appropriate point of contact would be in the Azure organisation if @hongooi73 is unavailable, may require a general enquiry. What happens if an author of a package is unavailable and therefore unable to formally pass authorship? Is there a process where ownership can be transferred, or failing that grant merge (or other) permissions to other trusted contributors? |
For CRAN, their requirement is to "explain any change in the maintainer’s email address and if possible send confirmation from the previous address (by a separate email to [email protected]) or explain why it is not possible." I haven't gone through this process myself, but some of it may depend on why the transfer is occurring (e.g. if @hongooi73 is no longer part of Microsoft). Regarding reaching out to Azure, it appears as though they list the contact address for the organisation as [email protected]. |
Hello all, apologies for the non-response, I've been dealing with some personal issues. I'll be looking at the accumulated issues over the next few days and merging/fixing as required. Sorry again for not being able to get this done before. |
Fixing shared files is difficult for me, as I don't have access to a business MS365 account (as far as I know, everything works with a personal account). Can someone who has a business account share a file for testing purposes? |
@hongooi73 if you give me an account name I'm happy to share a file with you. You can send to [email protected] and I'll reach out from my business account. |
@mstackhouse I've just sent you an email. Thanks! |
Just to clarify, is this problem occurring with the CRAN version of the package, or the dev version on Github? |
I am experiencing this problem on the CRAN version, can't speak for the dev version as I haven't tried it. |
Please try the Github version, as it makes changes to the shared object code. |
Hmm.. it looks like Business OD/SP files shared with a personal account don't show up in the listing 🤔 |
I have tried the GitHub version, connected to a Business OneDrive and ran |
What I mean is that on my personal MS365 account, the files that people have shared with me from a business account don't show up. But it sounds like the Github version fixes the issue of |
Correct. The CRAN version returns R6 objects of class ms_object only (which does not have the download or get_item methods), while the GitHub version returns R6 objects of ms_drive_item and ms_object and those do have download, get_item and presumably the other methods expected for the ms_drive_item class. @mstackhouse please can you test your original code again with the GitHub version of Microsoft365R and let us know if it works or not? |
I'm going to mark this as done. If people are still experiencing problems, feel free to reply to this thread. |
Currently I'm trying to access shared a shared folder, so in order to find the shared folder item I'm using the method
drv$list_shared_items()
. The list that's returned is a list ofms_object
objects.Prior to version, I could use that item directly to access files from within the shared folder using
folder_item$get_item("path")
, but now that the items are classed asms_object
theget_item()
method is not available.In the documentation, it states:
Unfortunately I can't get this to work, because:
drv$get_item()
. Any ID that I try returns a 404.The text was updated successfully, but these errors were encountered: