# NOT RUN {
# personal OneDrive
gr2 <- get_graph_login("consumers")
me <- gr2$get_user()
mydrv <- me$get_drive()
myfile <- drv$get_item("myfile.docx")
myfile$properties
# rename a file
myfile$update(name="newname.docx")
# open the file in the browser
myfile$open()
# download the file to the working directory
myfile$download()
# shareable links
myfile$create_share_link()
myfile$create_share_link(type="edit", expiry="24 hours")
myfile$create_share_link(password="Use-strong-passwords!")
# delete the file (will ask for confirmation first)
myfile$delete()
# }
Run the code above in your browser using DataLab