
9,663 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hello, I am looking for a way to change the settings described below from the PowerShell. From the Microsoft 365 admin center, go to "Settings" from the left-hand menu > "Org settings", select "Services" > "User owned apps and services" Clear the check mark from " Let users access the "Office Store" and “Let users start trials on behalf of your organization”
$body = @'
{
"@odata.type": "#microsoft.graph.adminAppsAndServices",
"settings": {
"@odata.type": "microsoft.graph.appsAndServicesSettings",
"isOfficeStoreEnabled": false,
"isAppAndServicesTrialEnabled": false
}
}
'@
Invoke-GraphRequest -Method PATCH -Uri "https://graph.microsoft.com/beta/admin/appsAndServices" -Body $body -ContentType 'application/json'