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.
- A have the Application Id and I've generated a new password;
- Application type Web and Redirect URLs https://moodle.isec.pt/moodle/admin/oauth2callback.php
- Uncheck Allow Implicit Flow
- Delegated Permissions: User.Read
- Home page URL: https://moodle.isec.pt/moodle/
- I've uncheck Live SDK support
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.
Error code: generalexceptionmessage
- 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.
Error code: generalexceptionmessage
- 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?