OneDrive - Problem using Access controlled links

OneDrive - Problem using Access controlled links

by António Godinho -
Number of replies: 0

Hi,


I'm running Moodle 3.6 and I've configured the OneDrive this way:

On the Microsoft site I've created a new application.

On Moodle OAuth2 Services -> crate new Microsoft:

  • Gave it a name and copied Client ID and Client secret
  • Scopes included in a login request: openid profile email user.read
  • Scopes included in a login request for offline access: openid profile email user.read offline_access
  • Left everything else by default

I've connect a System account connected, but I'm not sure if it's even required.

On manage repositories Microsoft OneDrive Enable and visible.


While testing, I select the file and Create an access controlled link to the file.


First I got this:

__________________________________________________________________________________________________________________________________________

Exception - invalidRequest: One of the provided arguments is not acceptable.

More information about this error

Debug info: 
Error code: generalexceptionmessage
Stack trace:
  • line 123 of /lib/classes/oauth2/rest.php: core\oauth2\rest_exception thrown
  • line 674 of /repository/onedrive/lib.php: call to core\oauth2\rest->call()
  • line 943 of /repository/onedrive/lib.php: call to repository_onedrive->create_folder_in_folder()
  • line 1204 of /lib/filelib.php: call to repository_onedrive->reference_file_selected()
  • line 328 of /lib/filelib.php: call to file_save_draft_area_files()
  • line 227 of /mod/assign/submission/file/locallib.php: call to file_postupdate_standard_filemanager()
  • line 7105 of /mod/assign/locallib.php: call to assign_submission_file->save()
  • line 7185 of /mod/assign/locallib.php: call to assign->save_submission()
  • line 455 of /mod/assign/locallib.php: call to assign->process_save_submission()
  • line 55 of /mod/assign/view.php: call to assign->view()
__________________________________________________________________________________________________________________________________________


Now I got:

__________________________________________________________________________________________________________________________________________

Exception - nameAlreadyExists: The specified item name already exists.

More information about this error

Debug info: 
Error code: generalexceptionmessage
Stack trace:
  • line 123 of /lib/classes/oauth2/rest.php: core\oauth2\rest_exception thrown
  • line 674 of /repository/onedrive/lib.php: call to core\oauth2\rest->call()
  • line 943 of /repository/onedrive/lib.php: call to repository_onedrive->create_folder_in_folder()
  • line 1204 of /lib/filelib.php: call to repository_onedrive->reference_file_selected()
  • line 328 of /lib/filelib.php: call to file_save_draft_area_files()
  • line 227 of /mod/assign/submission/file/locallib.php: call to file_postupdate_standard_filemanager()
  • line 7105 of /mod/assign/locallib.php: call to assign_submission_file->save()
  • line 7185 of /mod/assign/locallib.php: call to assign->save_submission()
  • line 455 of /mod/assign/locallib.php: call to assign->process_save_submission()
  • line 55 of /mod/assign/view.php: call to assign->view()
__________________________________________________________________________________________________________________________________________


I don't any error on my config or anywhere else.... Any advice?


Average of ratings: -