Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-57035

Cannot access OneDrive repository

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • 3.1.3, 3.2
    • 3.1.4, 3.2
    • Repositories
    • MOODLE_31_STABLE, MOODLE_32_STABLE
    • MOODLE_31_STABLE, MOODLE_32_STABLE
    • MDL-57035-master
    • Hide

      To test this you will need both a Live SDK application, and Converged application. This may require an older account on which you already have an existing Live application. https://apps.dev.microsoft.com

      1. Create a Converged and Live SDK app
      2. Access https://account.live.com/consent/Manage and confirm that those applications do not show up
      3. Set-up the Skydrive repository to use the Live SDK app
      4. Go to your private files
      5. Confirm that you can login, logout, download and browse your OneDrive account
      6. Repeat the test from step 3 using the Converged application.
      Show
      To test this you will need both a Live SDK application, and Converged application. This may require an older account on which you already have an existing Live application. https://apps.dev.microsoft.com Create a Converged and Live SDK app Access https://account.live.com/consent/Manage and confirm that those applications do not show up Set-up the Skydrive repository to use the Live SDK app Go to your private files Confirm that you can login, logout, download and browse your OneDrive account Repeat the test from step 3 using the Converged application.

    Description

      While testing MDLQA-10208, I noticed that I cannot use the the OneDrive repository. What I did are as follows:

      1. Expose a Moodle site on the internet (e.g. via ngrok)

        ./ngrok http 80 --bind-tls=true --region=au
        

        And copy the forwarding HTTPS URL.

      2. Set the following configurations:

        $CFG->wwwroot = 'https://[NGROK_DOMAIN]/[MOODLE_URL]';
        $CFG->sslproxy = true;
        

      3. Go to Site administration / Plugins / Repositories / Manage repositories
      4. Set "Microsoft OneDrive" as "Enabled and visible"
      5. On the "Configure Microsoft OneDrive" page, copy the OAuth2 callback URL defined under "As part of the registration process, you will need to enter the following URL as 'Redirect domain':".
      6. Click on the link "with Microsoft"
      7. Sign in with your Microsoft account and register your site.
      8. Give a name for your app (e.g. Moodle OneDrive Repo).
      9. Under "Application Secrets", click "Generate New Password". Copy/take note of this password for later use.
      10. Under "Platforms", click "Add Platform" and click on "Web"
      11. Paste the OAuth2 callback URL into the "Redirect URIs" field.
      12. Click "Save".
      13. Go back to the "Configure Microsoft OneDrive" window.
      14. Enter a Repository plugin name. (e.g. Moodle OneDrive Repo).
      15. Copy and paste this generated password into the "Secret" field of the "Configure Microsoft OneDrive" page.
      16. Copy the "Application Id" and paste it into the "Client ID" field of the "Configure Microsoft OneDrive" page.
      17. Click "Save"
      18. Go to "Site administration / Users / Permissions / Check system permissions".
      19. Make sure that the admin user has the "View OneDrive" (repository/skydrive:view) capability.
      20. Go to your "Private files" page.
      21. Click on the "Add..." button on the file picker.
      22. Click on the OneDrive repository.
      23. Click "Login to your account"
      24. Login to your OneDrive account and give permission to your moodle site.
      25. Expected
        • The OneDrive login dialogue will close and you will be able to see your OneDrive files.
      26. Actual
        • The OneDrive login dialogue closes but the "Login to your account" button is still displayed and you cannot view your OneDrive files.

      Attachments

        Issue Links

          Activity

            People

              fred Frédéric Massart
              jpataleta Jun Pataleta
              Simey Lameze Simey Lameze
              Andrew Lyons Andrew Lyons
              Jun Pataleta Jun Pataleta
              David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                5/Dec/16