After building the NPR One Service for Sonos, I recently found myself looking for a way to play my music stored on OneDrive. Seeing that OneDrive provides an easy to use API, I built this service. If you run into any issues, feel free to email me at b.michael.dick@gmail.com.

If you are a developer yourself, all code is available on GitHub and you can set up your own server if you prefer to do so.

Updates

01/27/2021: Now also supporting OneDrive for Business accounts

FAQ


I get an error message 400 bad request This seemse to happen from time to time. Just start over with adding the service through the customsd.htm below and make sure you follow every step exactly. Sometimes waiting another day before trying again helps.

I get an error that my account can’t be authorized This seemse to happen from time to time. Just start over with adding the service through the customsd.htm below and make sure you follow every step exactly. Sometimes waiting another day before trying again helps.

Does this cost money? People have been asking, so… if you would like to help out with server costs to run this, you can send me a few bucks on my Paypal or Venmo at b.michael.dick@gmail.com. This is a free service that I built, so this is defnitely not required but greatly appreciated.

How do I stay in the loop on any updates?

Instructions


Adding OneDrive to your Sonos

Open your Sonos desktop app and go to Help -> About my Sonos System… (on Mac this is located under the SONOS menu)

screenshot

screenshot

Then note down the ip address under Associated Product. For me this would be 192.168.1.203.

Alternatively, you can also use your Sonos app on your iOS or Android to find the ip address. Check under Settings -> About my Sonos System

screenshot

Open a web browser and type http://[your ip address from above]:1400/customsd.htm. So for me this would be http://192.168.1.203:1400/customsd.htm.

Enter the information below into the form and hit submit. This will add the service to your Sonos.

  1. SID: 248
  2. Service Name: OneDrive
  3. Secure Endpoint URL: https://sonosonedrive.michaeldick.me/soap
  4. Polling Interval: 3600
  5. Authentication SOAP header policy: Device Link
  6. Strings table:
    • Version: 1
    • Uri: https://sonosonedrive.michaeldick.me/static/strings.xml
  7. Presentation map:
    • Version: 1
    • Uri: https://sonosonedrive.michaeldick.me/static/presentationMap.xml
  8. Container Type:
    • Music Service
  9. Capabilities:
    • Search

screenshot

Go back to your Sonos app and choose Add Music Service. You should now find OneDrive in the list of services.

screenshot

Select I already have an account.

screenshot

Open https://login.live.com/oauth20_remoteconnect.srf and enter the code shown in the Sonos window.

screenshot

Allow access for the OneDrive Sonos app. You might have to log in first with your Microsoft credentials if you haven’t done already.

screenshot

Now you are all set and can start listening to music from your OneDrive. Browse through your folders and add folders or songs to your My Sonos.

Feel free to reach out with any questions or issues at b.michael.dick@gmail.com.

Removing OneDrive from your Sonos

If you would like to remove the OneDrive service from your Sonos just follow the steps below.

Open your desktop app and go to Manage -> Settings…

screenshot

Find the OneDrive services in the list and hit Remove.

screenshot

Go back to the browser page from above and submit the form, leaving all fields empty, but the SID set to 248. This will remove the OneDrive service from your Sonos.

screenshot