web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Chrome Policy Error
Power Apps
Suggested Answer

Chrome Policy Error

(2) ShareShare
ReportReport
Posted on by 2
Getting a Chrome Policy error "Expected string value" when using the "DefaultPrinterSelection" entry in policies.json
 
My policies file entry is...
 
{
"namePattern": {
   "description": "Printernamehere",
   "type": "string"
  }
 },
 
Categories:
I have the same question (0)
  • Suggested answer
    Ravi-Prajapati Profile Picture
    416 Super User 2025 Season 2 on at

    The error "Expected string value" in your policies.json file suggests that there is a formatting issue with the "DefaultPrinterSelection" entry. The structure of the policy might be incorrect.

    Correct Format for DefaultPrinterSelection

    The Google Chrome Enterprise policies documentation specifies that DefaultPrinterSelection should be an array of objects, with each object containing a "namePattern" key and a string value. Here's the correct structure:

     
    {
    "DefaultPrinterSelection": [
    {
    "namePattern": "Printernamehere"
    }
    ]
    }

    Issues with Your JSON

    Your original JSON appears to be incorrect because:

    1. The key "DefaultPrinterSelection" is missing.
    2. "namePattern" should be inside an array as part of DefaultPrinterSelection.
    3. The "type": "string" and "description" keys are unnecessary in policies.json.

    Steps to Fix

    1. Replace your current policies.json entry with the correctly formatted JSON above.
    2. Ensure the file is valid JSON (you can use an online JSON validator like jsonlint.com).
    3. Restart Chrome or enforce the policy using:
      • On Windows: Run gpupdate /force (if managed via Group Policy).
      • On Mac/Linux: Restart Chrome.
  • KM-21021458-0 Profile Picture
    2 on at
    Hi Ravi
     
    Many thanks for response
    I was following the guide here which doesn't mention any array requirement
     
     
    However I have now found syntax which appears to fulfil my requirements and sets the default printer to one of my choosing by setting the policies.json entry as follows:
     
    {
            "DefaultPrinterSelection": "{ \"namePattern\": \"Printernamehere\" }"
    }

     
     
     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard