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

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

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 Group Policy
Windows Group Policy
A feature of Windows that enables policy-based administration using Active Directory.
1,869 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.
257 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,048 questions
Microsoft Intune
Microsoft Intune
A Microsoft cloud-based management solution that offers mobile device management, mobile application management, and PC management capabilities.
2,070 questions
No comments
{count} votes

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

    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. answered 2021-11-10T22:31:15.807+00:00
    Rahul Jindal [MVP] 6,161 Reputation points Microsoft MVP

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

    No comments

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

    Currently working with PRO.