Windows 10 MDM - Personalization-csp, DesktopImageUrl setting failing.

Dan Meier-Conroy 121 Reputation points
2021-11-10T21:39:40.89+00:00

Hey all.

I'm currently writing an MDM and I'm trying to send down a URL for the desktop image, but it keeps failing on the download.

I know why - but I'm curious if there's a workaround for this.

The issue is I'm using an MVC project and the file is being returned as a 'FileStreamResult'. Any permanent URLs I use work fine, but if I try to do anything where I'm returning the file via an action if fails to download. I should point out browsing to the image via a browser works fine.

Anyone know how to get this to work without needed a permanent URL?

Example:

This works, because the file is in the root directory:

https://daniel.local.mdm/Background.png

This fails because Homescreens is the controller and the 'GetWallpaperFile' is the action. (I'm using a Route Map to get background.png to point to it)

https://daniel.local.mdm/HomeScreens/GetWallpaperFile/Background.png

The code in the action is:

public ActionResult GetWallpaperFile()
{
return new FileStreamResult(new System.IO.MemoryStream(Convert.FromBase64String(source_of_image)), "image/jpeg");
}

(Using return File(ResponseStream, ContentType) fails as well.)

Now, when I browse to "https://daniel.local.mdm/HomeScreens/GetWallpaperFile/Background.png" on the machine, it loads perfectly fine. But Windows MDM just refuses to accept it as the desktop image URL.

Any help is much appreciated.

Windows
Windows
A family of Microsoft operating systems that run across personal computers, tablets, laptops, phones, internet of things devices, self-contained mixed reality headsets, large collaboration screens, and other devices.
4,740 questions
Microsoft Partner Center API
Microsoft Partner Center API
Microsoft Partner Center: A Microsoft website for partners that provides access to product support, a partner community, and other partner services.API: A software intermediary that allows two applications to interact with each other.
313 questions
Microsoft Intune Configuration
Microsoft Intune Configuration
Microsoft Intune: A Microsoft cloud-based management solution that offers mobile device management, mobile application management, and PC management capabilities.Configuration: The process of arranging or setting up computer systems, hardware, or software.
1,716 questions
Microsoft Intune
Microsoft Intune
A Microsoft cloud-based management solution that offers mobile device management, mobile application management, and PC management capabilities.
4,323 questions
0 comments No comments
{count} vote

Accepted answer
  1. Dan Meier-Conroy 121 Reputation points
    2021-11-11T14:20:23.003+00:00

    Going to close this thread - after a late hour deep device it came down to a Filter that was attached to the controller which did http/cookie/error handling and Windows didn't like it.


2 additional answers

Sort by: Most helpful
  1. Rahul Jindal [MVP] 9,141 Reputation points MVP
    2021-11-10T22:31:15.807+00:00

    What edition of Windows 10 are you working against? Pro or Ent?

    0 comments No comments

  2. Dan Meier-Conroy 121 Reputation points
    2021-11-10T22:31:51.227+00:00

    Currently working with PRO.