We have a CMS that powers over 2000 school websites. The admin sites for each of those websites are all under the same root domain, e.g.
*.myadmin.com. We are working on integrating OneDrive File Picker on multiple pages in all of those admin sites.
We have an issue with the
Redirect URLs in the API Settings. We tried to set the
Root domain field to
myadmin.com by setting
Redirect URLs: to
That results in a popup window saying:
We're unable to complete your request. Microsoft account is experiencing technical problems. Please try again later.
In the address bar of the popup window, there's a further error description(url decoded):
error_description=The provided value for the input parameter 'redirect_uri' is not valid. The expected value is 'https://login.live.com/oauth20_desktop.srf' or a URL which matches the redirect URI registered for this client application.
Putting a specific url, like
https://subdomain.myadmin.com/homepage, in the API Setting would make the Picker work on that specific page, but not on other pages. Looks like it's looking for an exact match. Obviously it's not practical for us to create a separate app for each page that uses OneDrive.
The problem can be solved by disabling
Enhanced redirection security on the API Settings page. That option existed a few weeks ago when we created an app for development, but was marked as deprecated. Today when we created a new app for production, it wasn't there anymore, which I think is now enabled for all new apps.
We had a similar issue with Dropbox Drop-ins Chooser, but we were able to solve the problem by setting
myadmin.com as the domain of the app.
Is there any work around for this problem?
Thanks for your help and suggestions.
You can add multiple Redirect URLs as long as all of them are in the same subdomain. Each redirection URL needs to be specified explicitly:
The only way I could get this to work was
a working copy (link may be removed at any time ) Testing OneDrive in an iframe
Other pertinent urls
Some example usage of postMessage
The bug with the Microsoft developer console mention is resolved if you put the root domain you want first, then the 2 sub domains.
Add 3 entires: 1. domain.com 2. sub1.domain.com 3. sub2.domain.com