Skip to content

Commit fba3857

Browse files
authored
1 parent 3be5102 commit fba3857

File tree

13,542 files changed

+1105404
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

13,542 files changed

+1105404
-0
lines changed

.devcontainer/devcontainer.json

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
2+
// README at: https://github.com/devcontainers/templates/tree/main/src/python
3+
{
4+
"name": "Python 3",
5+
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
6+
"image": "mcr.microsoft.com/devcontainers/python:1-3.12-bullseye"
7+
8+
// Features to add to the dev container. More info: https://containers.dev/features.
9+
// "features": {},
10+
11+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
12+
// "forwardPorts": [],
13+
14+
// Use 'postCreateCommand' to run commands after the container is created.
15+
// "postCreateCommand": "pip3 install --user -r requirements.txt",
16+
17+
// Configure tool-specific properties.
18+
// "customizations": {},
19+
20+
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
21+
// "remoteUser": "root"
22+
}

.env.template

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
AZURE_TENANT_ID=
2+
AZURE_CLIENT_ID=
3+
AZURE_CLIENT_SECRET=

.github/workflows/main.yml

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Refresh data
2+
3+
on:
4+
workflow_dispatch:
5+
schedule:
6+
- cron: "0 0 * * *" # daily
7+
8+
jobs:
9+
main:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
id-token: write # Graph auth
13+
contents: write # committing
14+
steps:
15+
- uses: actions/[email protected]
16+
# azure-identity doesn't support GitHub WIF
17+
- uses: azure/login@v1
18+
with:
19+
tenant-id: ${{ vars.AZURE_TENANT_ID }}
20+
client-id: ${{ vars.AZURE_CLIENT_ID }}
21+
allow-no-subscriptions: true
22+
- uses: actions/[email protected]
23+
with:
24+
python-version: 3.12
25+
cache: pip
26+
- run: pip install -r requirements.txt
27+
- run: python main.py
28+
- uses: EndBug/[email protected]
29+
with:
30+
default_author: github_actions
31+
message: 'chore: refresh data'

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.env

main.py

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
from dotenv import load_dotenv
2+
load_dotenv()
3+
4+
import asyncio
5+
import json
6+
import os
7+
from pathlib import Path
8+
9+
from azure.identity.aio import DefaultAzureCredential
10+
from msgraph_beta import GraphServiceClient
11+
from kiota_abstractions.native_response_handler import NativeResponseHandler
12+
from kiota_http.middleware.options import ResponseHandlerOption
13+
14+
from msgraph_beta.generated.device_management.configuration_settings.configuration_settings_request_builder import ConfigurationSettingsRequestBuilder
15+
16+
client = GraphServiceClient(DefaultAzureCredential(), ['https://graph.microsoft.com/.default'])
17+
18+
async def main():
19+
output = 'settings'
20+
21+
query_params = ConfigurationSettingsRequestBuilder.ConfigurationSettingsRequestBuilderGetQueryParameters(
22+
top=10
23+
)
24+
request_config = ConfigurationSettingsRequestBuilder.ConfigurationSettingsRequestBuilderGetRequestConfiguration(
25+
options=[ResponseHandlerOption(NativeResponseHandler())],
26+
# query_parameters=query_params
27+
)
28+
settings = await client.device_management.configuration_settings.get(request_configuration=request_config)
29+
30+
os.makedirs(output, exist_ok=True)
31+
for setting in settings.json()['value']:
32+
setting.pop('version')
33+
path = Path(output, setting['id']).with_suffix('.json')
34+
with open(path, 'w', encoding='utf-8') as f:
35+
json.dump(setting, f, ensure_ascii=False, indent=4)
36+
37+
asyncio.run(main())

requirements.txt

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
msgraph-beta-sdk
2+
python-dotenv

settings/.globalpreferences_.json

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
{
2+
"@odata.type": "#microsoft.graph.deviceManagementConfigurationSettingGroupCollectionDefinition",
3+
"accessTypes": "none",
4+
"keywords": [
5+
"Global Preferences"
6+
],
7+
"infoUrls": [],
8+
"occurrence": null,
9+
"baseUri": "",
10+
"offsetUri": ".GlobalPreferences",
11+
"rootDefinitionId": ".globalpreferences_.globalpreferences",
12+
"categoryId": "1829cdc1-1bed-4058-9aba-9b778cd3d955",
13+
"settingUsage": "configuration",
14+
"uxBehavior": "default",
15+
"visibility": "settingsCatalog,template",
16+
"id": ".globalpreferences_.globalpreferences",
17+
"description": "Synthetic Top Level Setting Group Collection",
18+
"helpText": null,
19+
"name": ".GlobalPreferences",
20+
"displayName": "Top Level Setting Group Collection",
21+
"childIds": [
22+
".globalpreferences_multiplesessionenabled",
23+
".globalpreferences_com.apple.autologout.autologoutdelay"
24+
],
25+
"maximumCount": 1,
26+
"minimumCount": 0,
27+
"applicability": {
28+
"description": null,
29+
"platform": "macOS",
30+
"deviceMode": "none",
31+
"technologies": "mdm,appleRemoteManagement"
32+
},
33+
"referredSettingInformationList": [],
34+
"dependentOn": [],
35+
"dependedOnBy": [
36+
{
37+
"dependedOnBy": ".globalpreferences_multiplesessionenabled",
38+
"required": false
39+
},
40+
{
41+
"dependedOnBy": ".globalpreferences_com.apple.autologout.autologoutdelay",
42+
"required": false
43+
}
44+
]
45+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
{
2+
"@odata.type": "#microsoft.graph.deviceManagementConfigurationSimpleSettingDefinition",
3+
"accessTypes": "none",
4+
"keywords": [
5+
"Global Preferences"
6+
],
7+
"infoUrls": [],
8+
"occurrence": null,
9+
"baseUri": "",
10+
"offsetUri": "com.apple.autologout.AutoLogOutDelay",
11+
"rootDefinitionId": ".globalpreferences_.globalpreferences",
12+
"categoryId": "1829cdc1-1bed-4058-9aba-9b778cd3d955",
13+
"settingUsage": "configuration",
14+
"uxBehavior": "default",
15+
"visibility": "settingsCatalog,template",
16+
"id": ".globalpreferences_com.apple.autologout.autologoutdelay",
17+
"description": "The autologout delay, in seconds. A value of 0 means autologout is off. In some cases, this delay may be restricted to values between 5 minutes and 24 hours.",
18+
"helpText": null,
19+
"name": "com.apple.autologout.AutoLogOutDelay",
20+
"displayName": "Auto Log Out Delay",
21+
"applicability": {
22+
"description": null,
23+
"platform": "macOS",
24+
"deviceMode": "none",
25+
"technologies": "mdm,appleRemoteManagement"
26+
},
27+
"referredSettingInformationList": [],
28+
"valueDefinition": {
29+
"@odata.type": "#microsoft.graph.deviceManagementConfigurationIntegerSettingValueDefinition",
30+
"maximumValue": 2147483647,
31+
"minimumValue": 0
32+
},
33+
"defaultValue": {
34+
"@odata.type": "#microsoft.graph.deviceManagementConfigurationIntegerSettingValue",
35+
"settingValueTemplateReference": null,
36+
"value": 0
37+
},
38+
"dependentOn": [
39+
{
40+
"dependentOn": ".globalpreferences_.globalpreferences",
41+
"parentSettingId": ".globalpreferences_.globalpreferences"
42+
}
43+
],
44+
"dependedOnBy": []
45+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
{
2+
"@odata.type": "#microsoft.graph.deviceManagementConfigurationChoiceSettingDefinition",
3+
"accessTypes": "none",
4+
"keywords": [
5+
"Global Preferences"
6+
],
7+
"infoUrls": [],
8+
"occurrence": null,
9+
"baseUri": "",
10+
"offsetUri": "MultipleSessionEnabled",
11+
"rootDefinitionId": ".globalpreferences_.globalpreferences",
12+
"categoryId": "1829cdc1-1bed-4058-9aba-9b778cd3d955",
13+
"settingUsage": "configuration",
14+
"uxBehavior": "toggle",
15+
"visibility": "settingsCatalog,template",
16+
"id": ".globalpreferences_multiplesessionenabled",
17+
"description": "If false, disables fast user switching.",
18+
"helpText": null,
19+
"name": "MultipleSessionEnabled",
20+
"displayName": "Multiple Session Enabled",
21+
"defaultOptionId": ".globalpreferences_multiplesessionenabled_true",
22+
"applicability": {
23+
"description": null,
24+
"platform": "macOS",
25+
"deviceMode": "none",
26+
"technologies": "mdm,appleRemoteManagement"
27+
},
28+
"referredSettingInformationList": [],
29+
"options": [
30+
{
31+
"itemId": ".globalpreferences_multiplesessionenabled_false",
32+
"description": null,
33+
"helpText": null,
34+
"name": "Disabled",
35+
"displayName": "False",
36+
"optionValue": {
37+
"@odata.type": "#microsoft.graph.deviceManagementConfigurationStringSettingValue",
38+
"settingValueTemplateReference": null,
39+
"value": "false"
40+
},
41+
"dependentOn": [
42+
{
43+
"dependentOn": ".globalpreferences_.globalpreferences",
44+
"parentSettingId": ".globalpreferences_.globalpreferences"
45+
}
46+
],
47+
"dependedOnBy": []
48+
},
49+
{
50+
"itemId": ".globalpreferences_multiplesessionenabled_true",
51+
"description": null,
52+
"helpText": null,
53+
"name": "Enabled",
54+
"displayName": "True",
55+
"optionValue": {
56+
"@odata.type": "#microsoft.graph.deviceManagementConfigurationStringSettingValue",
57+
"settingValueTemplateReference": null,
58+
"value": "true"
59+
},
60+
"dependentOn": [
61+
{
62+
"dependentOn": ".globalpreferences_.globalpreferences",
63+
"parentSettingId": ".globalpreferences_.globalpreferences"
64+
}
65+
],
66+
"dependedOnBy": []
67+
}
68+
]
69+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
{
2+
"@odata.type": "#microsoft.graph.deviceManagementConfigurationChoiceSettingDefinition",
3+
"accessTypes": "none",
4+
"keywords": [
5+
"TargetBlankImpliesNoOpener",
6+
"Do not set window.opener for links targeting _blank",
7+
"\\Microsoft Edge",
8+
"Microsoft Edge"
9+
],
10+
"infoUrls": [],
11+
"baseUri": "./User/Vendor/MSFT/Policy",
12+
"offsetUri": "/Config/microsoft_edgev88.0.705.23~Policy~microsoft_edge/TargetBlankImpliesNoOpener",
13+
"rootDefinitionId": "3~policy~microsoft_edge_targetblankimpliesnoopener",
14+
"categoryId": "a25a7a02-4bac-411b-9d02-10cb3297cb17",
15+
"settingUsage": "configuration",
16+
"uxBehavior": "toggle",
17+
"visibility": "settingsCatalog,template",
18+
"id": "3~policy~microsoft_edge_targetblankimpliesnoopener",
19+
"description": "If you enable this policy or leave it unset, the window.opener property is set to null unless the anchor specifies rel=\"opener\".\r\n\r\nIf you disable this policy, popups that target _blank are permitted to access (via JavaScript) the page that requested to open the popup.\r\n\r\nThis policy will be obsoleted in Microsoft Edge version 95.",
20+
"helpText": "",
21+
"name": "TargetBlankImpliesNoOpener",
22+
"displayName": "Do not set window.opener for links targeting _blank (User)",
23+
"defaultOptionId": "3~policy~microsoft_edge_targetblankimpliesnoopener_0",
24+
"applicability": {
25+
"@odata.type": "#microsoft.graph.deviceManagementConfigurationWindowsSettingApplicability",
26+
"description": null,
27+
"platform": "windows10",
28+
"deviceMode": "none",
29+
"technologies": "mdm",
30+
"configurationServiceProviderVersion": "5.0",
31+
"maximumSupportedVersion": null,
32+
"minimumSupportedVersion": null,
33+
"windowsSkus": [],
34+
"requiresAzureAd": false,
35+
"requiredAzureAdTrustType": "none"
36+
},
37+
"occurrence": {
38+
"minDeviceOccurrence": 1,
39+
"maxDeviceOccurrence": 1
40+
},
41+
"referredSettingInformationList": [],
42+
"options": [
43+
{
44+
"itemId": "3~policy~microsoft_edge_targetblankimpliesnoopener_0",
45+
"description": null,
46+
"helpText": null,
47+
"name": "Disabled",
48+
"displayName": "Disabled",
49+
"optionValue": {
50+
"@odata.type": "#microsoft.graph.deviceManagementConfigurationIntegerSettingValue",
51+
"settingValueTemplateReference": null,
52+
"value": 0
53+
},
54+
"dependentOn": [],
55+
"dependedOnBy": []
56+
},
57+
{
58+
"itemId": "3~policy~microsoft_edge_targetblankimpliesnoopener_1",
59+
"description": null,
60+
"helpText": null,
61+
"name": "Enabled",
62+
"displayName": "Enabled",
63+
"optionValue": {
64+
"@odata.type": "#microsoft.graph.deviceManagementConfigurationIntegerSettingValue",
65+
"settingValueTemplateReference": null,
66+
"value": 1
67+
},
68+
"dependentOn": [],
69+
"dependedOnBy": []
70+
}
71+
]
72+
}

0 commit comments

Comments
 (0)