-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathintune-api.swagger.json
More file actions
3416 lines (3413 loc) · 167 KB
/
Copy pathintune-api.swagger.json
File metadata and controls
3416 lines (3413 loc) · 167 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
{
"swagger": "2.0",
"info": {
"title": "Intune AI Scout API",
"version": "3.0",
"description": "Azure Functions API for Microsoft Intune device management and Microsoft Defender for Endpoint security operations. Direct Azure Functions endpoints with function key authentication. Provides comprehensive device inventory, compliance monitoring, security assessments, threat management, PowerShell and shell script management, and advanced application filtering capabilities with hybrid server/client-side filtering for enterprise IT and security teams."
},
"host": "your-function-app.azurewebsites.net",
"basePath": "/api",
"schemes": [
"https"
],
"consumes": [],
"produces": [],
"paths": {
"/intune/devices": {
"get": {
"operationId": "GetIntuneDevices",
"summary": "Get Intune Devices",
"description": "Retrieves Intune device inventory with extended properties (uses BETA API). Returns 85+ properties including autopilotEnrolled, malwareCounts, hardwareInformation, processorArchitecture. Use when user asks to list, show, find, or query devices. CRITICAL: Execute immediately without prompting for optional parameters. When user says 'show devices' or 'list devices' with NO criteria, call with filter=null and top=25. Only construct filter when user explicitly mentions OS, compliance, ownership, user, or date criteria. Examples: 'show devices'->filter=null,top=25; '5 Windows devices'->filter=operatingSystem eq 'Windows',top=5; 'compliant devices'->filter=complianceState eq 'compliant',top=25. Do NOT use for single device by ID (use GetIntuneDeviceById instead).",
"tags": [
"Intune Device Management"
],
"parameters": [
{
"name": "filter",
"in": "query",
"type": "string",
"required": false,
"description": "OPTIONAL: DO NOT prompt user for this parameter. Use null/empty when user says 'show devices' or 'list devices'. Only construct filter when user explicitly mentions criteria: OS ('Windows'->operatingSystem eq 'Windows'; 'iOS'->operatingSystem eq 'iOS'; 'Android'->operatingSystem eq 'Android'), Compliance ('compliant'->complianceState eq 'compliant'; 'non-compliant'->complianceState eq 'noncompliant'), Ownership ('corporate'->managedDeviceOwnerType eq 'company'; 'personal'->managedDeviceOwnerType eq 'personal'), User ('owned by name'->userPrincipalName eq 'user@domain.com'), Date ('last 2 days'->lastSyncDateTime ge [ISO8601 date, calculate current date minus 2 days in format 2025-10-19T00:00:00Z]). For dates, calculate ISO 8601 datetime - never use now() function. Combine with 'and' operator.",
"x-example": "operatingSystem eq 'Android' and userPrincipalName eq 'user@domain.com' and lastSyncDateTime ge 2025-10-19T00:00:00Z"
},
{
"name": "top",
"in": "query",
"type": "integer",
"required": false,
"default": 100,
"description": "OPTIONAL: DO NOT prompt user for this parameter. Always provide a value automatically. Extraction rules: '5 devices'/'show 5'->5, '10 devices'/'top 10'->10, '50 devices'->50, '100 devices'->100, NO number specified->25 (default for chat). Maximum: 200. Backend default: 100.",
"x-example": 25
}
],
"responses": {
"200": {
"description": "Successfully retrieved device list",
"schema": {
"type": "object",
"properties": {
"devices": {
"type": "array",
"description": "Array of managed device objects with extended BETA properties including: id, deviceName, operatingSystem, osVersion, complianceState, lastSyncDateTime, enrolledDateTime, userPrincipalName, model, manufacturer, serialNumber, autopilotEnrolled, deviceFirmwareConfigurationInterfaceManaged, windowsActiveMalwareCount, windowsRemediatedMalwareCount, hardwareInformation, processorArchitecture, physicalMemoryInBytes, ethernetMacAddress, specificationVersion, bootstrapTokenEscrowed",
"items": {
"type": "object"
}
},
"count": {
"type": "integer",
"format": "int32",
"description": "Number of devices returned in this response"
},
"nextLink": {
"type": "string",
"description": "OData nextLink for pagination if more results are available"
},
"timestamp": {
"type": "string",
"description": "ISO 8601 timestamp when the request was processed"
}
}
}
},
"400": {
"description": "Bad request - invalid filter expression or parameters"
},
"401": {
"description": "Unauthorized - invalid or missing API key"
},
"500": {
"description": "Internal server error - check logs for details",
"schema": {
"type": "object",
"properties": {
"error": {
"type": "string"
},
"message": {
"type": "string"
},
"timestamp": {
"type": "string",
"description": "Error timestamp in ISO 8601 format"
}
}
}
}
},
"x-code-samples": [
{
"lang": "PowerShell",
"source": "# Get all devices (default 100)\nInvoke-RestMethod -Uri 'https://your-function-app.azurewebsites.net/api/intune/devices?code=<function-key>' -Method GET\n\n# Filter by Windows devices\nInvoke-RestMethod -Uri 'https://your-function-app.azurewebsites.net/api/intune/devices?filter=operatingSystem%20eq%20%27Windows%27&code=<function-key>' -Method GET\n\n# Get top 25 non-compliant devices\nInvoke-RestMethod -Uri 'https://your-function-app.azurewebsites.net/api/intune/devices?filter=complianceState%20eq%20%27noncompliant%27&top=25&code=<function-key>' -Method GET\n\n# Complex filter: Corporate Windows devices that are compliant\nInvoke-RestMethod -Uri 'https://your-function-app.azurewebsites.net/api/intune/devices?filter=operatingSystem%20eq%20%27Windows%27%20and%20complianceState%20eq%20%27compliant%27%20and%20managedDeviceOwnerType%20eq%20%27company%27&code=<function-key>' -Method GET"
}
]
}
},
"/intune/device": {
"get": {
"operationId": "GetIntuneDeviceById",
"summary": "Get Intune Device by ID",
"description": "Retrieves detailed device information using unique Intune device identifier. Returns comprehensive profile: hardware specs, software config, compliance policies, security settings. Wraps Microsoft Graph API deviceManagement/managedDevices/{id} with simplified auth via Azure Function keys and managed identity. Use when user asks to get/retrieve/show specific device by ID. Do NOT use for listing multiple devices or filtering (use GetIntuneDevices).\n\nFor AI/Chat: Only call with real, valid Intune device GUID (format: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx with hex values). If user provides device name, example ID, or uncertain if ID is real, use GetIntuneDevices first to search and extract real device ID. If returns 404, inform user device ID doesn't exist and suggest searching by name via GetIntuneDevices.",
"tags": [
"Intune Device Management"
],
"parameters": [
{
"name": "id",
"in": "query",
"required": true,
"type": "string",
"description": "REQUIRED: Unique Intune device identifier (GUID format: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx). Must be a real device GUID from Intune, not device name, serial number, or Azure AD device ID. If user provides device name or you don't have a confirmed valid device GUID, call GetIntuneDevices first to search and extract the real device ID.",
"x-example": "f020be15-349e-4560-b2a7-3bd2dde3cb18"
}
],
"responses": {
"200": {
"description": "Successfully retrieved device details"
},
"400": {
"description": "Bad request - missing or invalid device ID parameter"
},
"401": {
"description": "Unauthorized - invalid or missing API key"
},
"404": {
"description": "Device not found - no device exists with the provided ID"
},
"500": {
"description": "Internal server error - check logs for details"
}
}
}
},
"/intune/device/{deviceId}/action": {
"post": {
"operationId": "IntuneRemoteAction",
"summary": "Intune Remote Action",
"description": "Execute management action on Intune device. Supports: sync (force check-in), reboot, remoteLock, windowsDefenderScan, windowsDefenderFullScan, collectDiagnostics, rename. Use when user says 'sync device', 'reboot device', 'lock device', 'scan device for malware'. WORKFLOW: If user provides device name, first call GetIntuneDevices to get deviceId, then call this. Examples: 'sync my laptop'->GetIntuneDevices(laptop)->IntuneRemoteAction(id, sync); 'reboot DESKTOP-ABC'->action:reboot; 'run defender scan on device X'->action:windowsDefenderScan.",
"tags": [
"Intune Device Management"
],
"consumes": ["application/json"],
"parameters": [
{
"name": "deviceId",
"in": "path",
"type": "string",
"required": true,
"description": "REQUIRED: Intune device ID (GUID). If user provides device name, first call GetIntuneDevices to find ID.",
"x-example": "f020be15-349e-4560-b2a7-3bd2dde3cb18"
},
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"type": "object",
"required": ["action"],
"properties": {
"action": {
"type": "string",
"enum": ["sync", "reboot", "remoteLock", "windowsDefenderScan", "windowsDefenderFullScan", "collectDiagnostics", "rename"],
"description": "REQUIRED: Action to execute. 'sync'->force device check-in, 'reboot'->restart device, 'remoteLock'->lock device, 'windowsDefenderScan'->run quick AV scan, 'windowsDefenderFullScan'->run full AV scan, 'collectDiagnostics'->collect logs, 'rename'->rename device (requires newName)."
},
"newName": {
"type": "string",
"description": "REQUIRED for rename action. New device name."
},
"scanType": {
"type": "string",
"enum": ["quick", "full"],
"description": "OPTIONAL for windowsDefenderScan. 'quick' (default) or 'full' scan."
}
}
}
}
],
"responses": {
"200": {
"description": "Action executed successfully",
"schema": {
"type": "object",
"properties": {
"success": { "type": "boolean" },
"message": { "type": "string" },
"action": { "type": "string" },
"actionDescription": { "type": "string" },
"device": {
"type": "object",
"properties": {
"id": { "type": "string" },
"deviceName": { "type": "string" },
"operatingSystem": { "type": "string" },
"userPrincipalName": { "type": "string" }
}
},
"note": { "type": "string" }
}
}
},
"400": { "description": "Bad request - invalid action, missing confirmation for destructive action, or missing required parameters" },
"401": { "description": "Unauthorized - invalid API key" },
"403": { "description": "Forbidden - requires DeviceManagementManagedDevices.ReadWrite.All permission" },
"404": { "description": "Device not found" }
}
}
},
"/intune/compliance": {
"get": {
"operationId": "GetIntuneCompliance",
"summary": "Get Intune Compliance",
"description": "Returns organizational compliance summary and policy list with extended properties (uses BETA API). Returns 45+ properties per policy including roleScopeTagIds, version, validOperatingSystemBuildRanges. Use for org-wide statistics. Do NOT use for device lists (use GetIntuneDevices). CRITICAL: Execute immediately without prompting for optional parameters. When user says 'show compliance' or 'compliance status' with NO criteria, call with filter=null and top=25. Only construct filter when user explicitly mentions platform or policy name. Examples: 'show compliance'->filter=null,top=25; '5 Windows policies'->filter=platformType eq 'windows10',top=5; 'iOS policies'->filter=platformType eq 'iOS',top=25.",
"tags": [
"Intune Compliance"
],
"parameters": [
{
"name": "top",
"in": "query",
"type": "integer",
"required": false,
"default": 100,
"description": "OPTIONAL: DO NOT prompt user for this parameter. Always provide a value automatically. Extraction rules: '5 policies'/'show 5'->5, '10 policies'->10, NO number specified->25 (default for chat). Maximum: 200. Backend default: 100.",
"x-example": 25
},
{
"name": "filter",
"in": "query",
"type": "string",
"required": false,
"description": "OPTIONAL: DO NOT prompt user for this parameter. Use null/empty when user says 'show compliance' or 'compliance status'. Only construct filter when user explicitly mentions: Platform ('Windows'->platformType eq 'windows10'; 'iOS'->platformType eq 'iOS'; 'Android'->platformType eq 'android'), Policy name (displayName eq 'PolicyName'). Combine with 'and' operator.",
"x-example": "platformType eq 'windows10'"
}
],
"responses": {
"200": {
"description": "Successfully retrieved compliance data",
"schema": {
"type": "object",
"properties": {
"summary": {
"type": "object",
"description": "Organization-wide compliance summary with device counts by state"
},
"policies": {
"type": "array",
"description": "Array of compliance policy objects with extended BETA properties including: id, displayName, description, version, createdDateTime, lastModifiedDateTime, roleScopeTagIds, platformType, validOperatingSystemBuildRanges",
"items": {
"type": "object"
}
},
"timestamp": {
"type": "string",
"description": "ISO 8601 timestamp when the request was processed"
}
}
}
},
"400": {
"description": "Bad request - invalid filter expression or parameters"
},
"401": {
"description": "Unauthorized - invalid or missing API key"
},
"500": {
"description": "Internal server error - check logs for details"
}
}
}
},
"/intune/device-apps": {
"get": {
"operationId": "GetIntuneDeviceApps",
"summary": "Get Intune Device Applications",
"description": "Returns applications INSTALLED on a SPECIFIC device. ONLY use when user explicitly mentions a device name or device ID with phrases like 'apps on device X', 'installed on X', 'software on X'. Requires deviceId parameter. Do NOT use for 'show apps', 'list apps', 'managed apps', 'app catalog' - use GetIntuneManagedApps for those. CRITICAL: If no device is mentioned in the query, DO NOT use this tool. If user provides device name instead of ID, first call GetIntuneDevices to get ID. Examples: 'apps on device COPILOT-YES'->THIS TOOL; 'what's installed on 2959a5a5-...'->THIS TOOL; 'show apps'->WRONG use GetIntuneManagedApps; 'list applications'->WRONG use GetIntuneManagedApps.",
"tags": [
"Intune Application Management"
],
"parameters": [
{
"name": "deviceId",
"in": "query",
"required": true,
"type": "string",
"description": "REQUIRED: Unique Intune device identifier (GUID format). If user provides device name instead of ID, first call GetIntuneDevices to find the device and extract its ID. Extract from user message or previous GetIntuneDevices response.",
"x-example": "2959a5a5-6c36-4bf7-bc4d-4e3e07e55388"
},
{
"name": "top",
"in": "query",
"type": "integer",
"required": false,
"default": 100,
"description": "OPTIONAL: DO NOT prompt user for this parameter. Always provide a value automatically. Extraction rules: '5 apps'/'show 5'->5, '10 applications'/'top 10'->10, NO number specified->25 (default for chat). Backend default: 100. Maximum: 200.",
"x-example": 25
}
],
"responses": {
"200": {
"description": "Successfully retrieved device applications",
"schema": {
"type": "object",
"properties": {
"applications": {
"type": "array",
"description": "Array of detected application objects installed on the device",
"items": {
"type": "object"
}
},
"count": {
"type": "integer",
"format": "int32",
"description": "Number of applications returned in this response (respects top parameter)"
},
"deviceId": {
"type": "string",
"description": "The device identifier that was queried"
},
"nextLink": {
"type": "string",
"description": "OData nextLink for pagination if more results are available"
},
"timestamp": {
"type": "string",
"description": "ISO 8601 timestamp when the request was processed"
},
"note": {
"type": "string",
"description": "API usage note"
}
}
}
},
"401": {
"description": "Unauthorized - invalid API key"
},
"404": {
"description": "Device not found"
}
}
}
},
"/intune/apps": {
"get": {
"operationId": "GetIntuneManagedApps",
"summary": "Get Intune Managed Applications",
"description": "Returns Intune app catalog - ALL managed apps in the tenant. CRITICAL: Use THIS tool FIRST to check if an app exists before any assignment operation. When user says 'assign X to Y', call this with filter=contains(displayName,'X') to get the appId. Also use for: 'show apps', 'list apps', 'find app'. Do NOT use AddWingetAppToIntune for assignment - that creates NEW apps. Workflow for 'assign app to group': 1) GetIntuneManagedApps(filter) to get appId, 2) GetAzureADGroups to get groupId, 3) AssignIntuneApp with both IDs. Examples: 'assign Speedtest to IT'->filter=contains(displayName,'Speedtest'); 'show apps'->filter=null,top=25.",
"tags": [
"Intune Application Management"
],
"parameters": [
{
"name": "top",
"in": "query",
"type": "integer",
"required": false,
"description": "OPTIONAL: DO NOT prompt user for this parameter. Maximum applications to return. Use top=25 by default. Backend default: 100. Maximum: 200. Only modify if user explicitly says 'show X apps'. Handles Graph API pagination automatically to ensure exact count is returned. When client-side filtering is used (osType, appType, version), fetches larger batch then applies filter and returns exactly top items."
},
{
"name": "filter",
"in": "query",
"type": "string",
"required": false,
"description": "OPTIONAL: DO NOT prompt user for this parameter. Leave to null if no filter criteria specified. OData filter for server-side filtering. Set only when user mentions specific criteria. Default: 'show apps'/'list applications'/'managed apps'->filter=null."
},
{
"name": "select",
"in": "query",
"type": "string",
"required": false,
"description": "OPTIONAL: DO NOT prompt user for this parameter. Comma-separated list of fields to include in response. Leave to null for all fields."
},
{
"name": "osType",
"in": "query",
"type": "string",
"required": false,
"description": "OPTIONAL: DO NOT prompt user for this parameter. Leave null if no OS specified. Set only when user mentions OS: 'Windows'->windows, 'Android'->android, 'iOS'->ios, 'macOS'->macos. Default: null."
},
{
"name": "appType",
"in": "query",
"type": "string",
"required": false,
"description": "OPTIONAL: DO NOT prompt user for this parameter. Leave null if no app type specified. Set only when user mentions type: 'store apps'->store, 'LOB apps'->lob, 'web apps'->web, 'winget apps'->winget. Default: null."
},
{
"name": "publisher",
"in": "query",
"type": "string",
"required": false,
"description": "OPTIONAL: DO NOT prompt user for this parameter. Leave null if no publisher specified. Set only when user mentions specific publisher name. Example: 'Microsoft apps'->Microsoft. Default: null."
},
{
"name": "version",
"in": "query",
"type": "string",
"required": false,
"description": "OPTIONAL: DO NOT prompt user for this parameter. Leave null if no version specified. Filter by application version - uses client-side filtering. Default: null."
}
],
"responses": {
"200": {
"description": "Successfully retrieved managed applications with filtering metadata",
"schema": {
"type": "object",
"properties": {
"apps": {
"type": "array",
"description": "Array of managed application objects from Intune",
"items": {
"type": "object"
}
},
"count": {
"type": "integer",
"format": "int32",
"description": "Number of applications returned"
},
"filterApplied": {
"type": "object",
"description": "Details of applied filters (server-side and client-side)"
},
"timestamp": {
"type": "string",
"description": "ISO 8601 timestamp"
}
}
}
},
"401": {
"description": "Unauthorized - invalid API key"
}
}
}
},
"/intune/windows-apps": {
"post": {
"operationId": "DeployWindowsApp",
"summary": "Deploy Windows App (Unified)",
"description": "UNIFIED Windows app deployment - auto-detects installer type and routes to appropriate method. USE THIS for ALL Windows app deployments. Just provide packageId and it handles everything: fetches from WinGet, detects installer type, auto-generates installCommand, deploys correctly. Routing: EXE->Win32, MSI->LOB (windowsMobileMSI), MSIX->WinGet (winGetApp with auto-updates). Execute immediately with just packageId. Examples: 'deploy Git'->packageId:Git.Git; 'deploy 7-Zip'->packageId:7zip.7zip; 'deploy Windows Terminal'->packageId:Microsoft.WindowsTerminal.",
"tags": [
"Intune Application Management"
],
"consumes": ["application/json"],
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"type": "object",
"required": ["packageId"],
"properties": {
"packageId": {
"type": "string",
"description": "REQUIRED: WinGet package ID in Publisher.AppName format. Auto-detects installer type: EXE->Win32, MSI->LOB, MSIX->WinGet."
},
"architecture": {
"type": "string",
"enum": ["x64", "x86", "arm64"],
"description": "OPTIONAL: DO NOT ask user. Preferred architecture. Default: x64."
},
"displayName": {
"type": "string",
"description": "OPTIONAL: DO NOT ask user. Auto-generated from WinGet metadata."
},
"description": {
"type": "string",
"description": "OPTIONAL: DO NOT ask user. Auto-generated from WinGet metadata."
},
"publisher": {
"type": "string",
"description": "OPTIONAL: DO NOT ask user. Auto-fetched from WinGet."
},
"version": {
"type": "string",
"description": "OPTIONAL: DO NOT ask user. Specific version to deploy. If not provided, uses latest version from WinGet. Set when user mentions specific version. Leave empty for latest."
},
"installCommand": {
"type": "string",
"description": "OPTIONAL: DO NOT ask user. Auto-generated from WinGet silent switches. Only needed for custom install args."
},
"updateExisting": {
"type": "boolean",
"description": "OPTIONAL: DO NOT ask user. Set true when user says 'update', 'redeploy', 'upgrade', 'refresh', 'new version', or 'reinstall'. If 409 Conflict received, suggest user retry with update option."
}
}
}
}
],
"responses": {
"200": {
"description": "App deployed successfully to Intune",
"schema": {
"type": "object",
"properties": {
"message": { "type": "string" },
"unifiedDeployment": { "type": "boolean", "description": "Always true - indicates unified endpoint was used" },
"packageId": { "type": "string" },
"deploymentMethod": { "type": "string", "enum": ["win32", "lob", "winget"], "description": "Deployment method used: win32 for EXE, lob for MSI, winget for MSIX" },
"installerType": { "type": "string", "description": "Detected installer type: exe, msi, msix, inno, nullsoft, wix, etc." },
"detectedMetadata": {
"type": "object",
"properties": {
"name": { "type": "string" },
"version": { "type": "string" },
"publisher": { "type": "string" },
"architecture": { "type": "string" }
}
},
"app": {
"type": "object",
"description": "The created/updated Intune app details",
"properties": {
"id": { "type": "string" },
"displayName": { "type": "string" },
"displayVersion": { "type": "string" }
}
},
"operation": { "type": "string", "enum": ["create", "update", "existing"] },
"nextSteps": { "type": "array", "items": { "type": "string" } },
"correlationId": { "type": "string" }
}
}
},
"400": { "description": "Bad request - invalid packageId or no installers found" },
"401": { "description": "Unauthorized - invalid API key" }
}
}
},
"/intune/winget-apps": {
"post": {
"operationId": "AddWingetAppToIntune",
"summary": "Add Microsoft Store App to Intune",
"description": "Adds Microsoft Store app to Intune with auto-fetched metadata. ONLY for apps available in Microsoft Store. For desktop apps not in MS Store, use CreateIntuneLOBApp or DeployWindowsApp. AUTO-METADATA: When displayName/publisher not provided, automatically fetches from Microsoft Store using Product ID. WORKFLOW: SearchWindowsApps(source=msstore)->AddWingetAppToIntune. RESPONSE HANDLING: If alreadyExists=true, inform user '[displayName] is already in Intune' and STOP. If app created successfully, inform user '[displayName] has been added to Intune' and STOP. CRITICAL: NEVER ask about assignment or call AssignIntuneApp UNLESS the user's original request explicitly mentioned 'assign', 'deploy to', or a group name.",
"tags": [
"Intune Application Management"
],
"consumes": ["application/json"],
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"type": "object",
"required": ["packageIdentifier"],
"properties": {
"packageIdentifier": {
"type": "string",
"description": "REQUIRED: Microsoft Store Product ID from SearchWindowsApps msstore results. Must be alphanumeric 9-14 chars (e.g., XPDM1ZW6815MQM for VLC, 9NBLGGH4Z1JC). DO NOT use WinGet community IDs (Publisher.Package format) - they will NOT work."
},
"displayName": {
"type": "string",
"description": "OPTIONAL: DO NOT prompt user. Auto-fetched from Microsoft Store if not provided. Only set if user explicitly specifies a custom name."
},
"description": {
"type": "string",
"description": "OPTIONAL: DO NOT prompt user. Auto-fetched from Microsoft Store if not provided."
},
"publisher": {
"type": "string",
"description": "OPTIONAL: DO NOT prompt user. Auto-fetched from Microsoft Store if not provided (e.g., 'VideoLAN' for VLC)."
},
"installExperience": {
"type": "string",
"enum": ["system", "user"],
"description": "OPTIONAL: DO NOT prompt user. Installation context. 'system' (default) installs for all users, 'user' installs for current user only."
}
}
}
}
],
"responses": {
"200": {
"description": "App already exists in Intune (alreadyExists=true) OR app created successfully. If alreadyExists=true, just inform user: '[displayName] is already in Intune.' Do NOT offer assignment unless user requested it.",
"schema": {
"type": "object",
"properties": {
"message": { "type": "string" },
"alreadyExists": { "type": "boolean", "description": "If true, app already exists in Intune" },
"existingApp": {
"type": "object",
"description": "Present when alreadyExists=true",
"properties": {
"id": { "type": "string", "description": "Intune app ID" },
"displayName": { "type": "string" },
"packageIdentifier": { "type": "string" }
}
},
"app": {
"type": "object",
"description": "Present when new app created",
"properties": {
"id": { "type": "string", "description": "Intune app ID" },
"displayName": { "type": "string" },
"packageIdentifier": { "type": "string" },
"publisher": { "type": "string" },
"installExperience": { "type": "object" }
}
},
"timestamp": { "type": "string", "description": "ISO 8601 timestamp" }
}
}
},
"201": {
"description": "WinGet app created successfully. Inform user: '[displayName] has been added to Intune.' Do NOT offer assignment unless user requested it.",
"schema": {
"type": "object",
"properties": {
"message": { "type": "string" },
"app": {
"type": "object",
"properties": {
"id": { "type": "string", "description": "Intune app ID" },
"displayName": { "type": "string" },
"packageIdentifier": { "type": "string" },
"publisher": { "type": "string" },
"installExperience": { "type": "object" }
}
},
"timestamp": { "type": "string" }
}
}
},
"400": { "description": "Bad request - invalid packageIdentifier or missing required fields" },
"401": { "description": "Unauthorized - invalid API key" }
}
}
},
"/intune/android/lob-apps": {
"post": {
"operationId": "CreateAndroidLOBApp",
"summary": "Deploy Android LOB App (APK Upload)",
"description": "Uploads Android APK file to Intune as a Line-of-Business app. Use for internal/enterprise Android apps not on Play Store. Requires APK download URL and package ID. The file is encrypted and uploaded to Azure Blob Storage. Use updateExisting:true to update existing app with new APK version. For Play Store apps, use AddAndroidStoreApp instead. Max size: 100MB. Examples: 'deploy company app.apk to Android'->installerUrl:https://..., packageId:com.company.app; 'update Android LOB app'->updateExisting:true.",
"tags": [
"Intune Application Management"
],
"consumes": ["application/json"],
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"type": "object",
"required": ["installerUrl", "packageId"],
"properties": {
"installerUrl": {
"type": "string",
"description": "REQUIRED: Direct download URL for the APK file."
},
"packageId": {
"type": "string",
"description": "REQUIRED: Android package identifier (e.g., 'com.company.myapp'). Used for app detection."
},
"displayName": {
"type": "string",
"description": "OPTIONAL: DO NOT ask user. Display name in Intune. Auto-generated from filename if not provided."
},
"description": {
"type": "string",
"description": "OPTIONAL: DO NOT ask user. App description for Intune portal."
},
"publisher": {
"type": "string",
"description": "OPTIONAL: DO NOT ask user. Publisher name. Defaults to 'Unknown'."
},
"versionName": {
"type": "string",
"description": "OPTIONAL: DO NOT ask user. Version display name (e.g., '1.2.3'). Defaults to '1.0.0'."
},
"versionCode": {
"type": "string",
"description": "OPTIONAL: DO NOT ask user. Version code integer as string (e.g., '123'). Defaults to '1'."
},
"minimumAndroidVersion": {
"type": "string",
"description": "OPTIONAL: DO NOT ask user. Minimum Android version (e.g., '9.0', '11.0'). Defaults to '9.0'.",
"enum": ["4.0", "4.1", "4.2", "4.3", "4.4", "5.0", "5.1", "6.0", "7.0", "7.1", "8.0", "8.1", "9.0", "10.0", "11.0", "12.0", "13.0", "14.0", "15.0"]
},
"updateExisting": {
"type": "boolean",
"description": "OPTIONAL: DO NOT ask user. Set true to update existing app with same displayName. Default: false."
}
}
}
}
],
"responses": {
"200": {
"description": "Android LOB app updated with new version successfully",
"schema": {
"type": "object",
"properties": {
"message": { "type": "string" },
"operation": { "type": "string", "enum": ["update"] },
"app": {
"type": "object",
"properties": {
"id": { "type": "string", "description": "Intune app ID" },
"displayName": { "type": "string" },
"packageId": { "type": "string" },
"versionName": { "type": "string" },
"versionCode": { "type": "string" },
"@odata.type": { "type": "string" }
}
}
}
}
},
"201": {
"description": "Android LOB app created and uploaded successfully",
"schema": {
"type": "object",
"properties": {
"message": { "type": "string" },
"operation": { "type": "string", "enum": ["create"] },
"app": {
"type": "object",
"properties": {
"id": { "type": "string", "description": "Intune app ID - use for AssignIntuneApp" },
"displayName": { "type": "string" },
"packageId": { "type": "string" },
"versionName": { "type": "string" },
"versionCode": { "type": "string" },
"@odata.type": { "type": "string", "description": "androidLobApp" },
"fileName": { "type": "string" },
"fileSize": { "type": "integer" },
"fileSizeFormatted": { "type": "string" }
}
},
"processingTime": { "type": "object" },
"nextSteps": { "type": "object" }
}
}
},
"400": { "description": "Bad request - invalid URL, missing packageId, or file too large" },
"401": { "description": "Unauthorized - invalid API key" },
"403": { "description": "Forbidden - requires DeviceManagementApps.ReadWrite.All permission" },
"409": { "description": "Conflict - Android LOB app with same name exists. Use updateExisting:true to update." }
}
}
},
"/intune/android/store-apps": {
"post": {
"operationId": "AddAndroidStoreApp",
"summary": "Add Android Play Store App",
"description": "Adds a public Google Play Store app to Intune. Provide the Play Store URL and display name. No file upload needed. For internal/enterprise APK files, use CreateAndroidLOBApp instead.",
"tags": [
"Intune Application Management"
],
"consumes": ["application/json"],
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"type": "object",
"required": ["appStoreUrl", "displayName"],
"properties": {
"appStoreUrl": {
"type": "string",
"description": "REQUIRED: Google Play Store URL. Format: https://play.google.com/store/apps/details?id=<package_id>"
},
"displayName": {
"type": "string",
"description": "REQUIRED: Display name for the app in Intune."
},
"description": {
"type": "string",
"description": "OPTIONAL: DO NOT ask user. App description for Intune portal."
},
"publisher": {
"type": "string",
"description": "OPTIONAL: DO NOT ask user. Publisher name. Defaults to 'Unknown'."
},
"minimumAndroidVersion": {
"type": "string",
"description": "OPTIONAL: DO NOT ask user. Minimum Android version. Defaults to '9.0'.",
"enum": ["4.0", "4.1", "4.2", "4.3", "4.4", "5.0", "5.1", "6.0", "7.0", "7.1", "8.0", "8.1", "9.0", "10.0", "11.0", "12.0", "13.0", "14.0", "15.0"]
}
}
}
}
],
"responses": {
"201": {
"description": "Android Store app added successfully",
"schema": {
"type": "object",
"properties": {
"message": { "type": "string" },
"app": {
"type": "object",
"properties": {
"id": { "type": "string", "description": "Intune app ID - use for AssignIntuneApp" },
"displayName": { "type": "string" },
"appStoreUrl": { "type": "string" },
"packageId": { "type": "string", "description": "Extracted from Play Store URL" },
"@odata.type": { "type": "string", "description": "androidStoreApp" },
"publishingState": { "type": "string" }
}
},
"nextSteps": { "type": "object" }
}
}
},
"400": { "description": "Bad request - invalid Play Store URL or missing required fields" },
"401": { "description": "Unauthorized - invalid API key" },
"403": { "description": "Forbidden - requires DeviceManagementApps.ReadWrite.All permission" },
"409": { "description": "Conflict - Android Store app with same name already exists" }
}
}
},
"/intune/app/{appId}": {
"get": {
"operationId": "GetIntuneAppById",
"summary": "Get Intune Application by ID",
"description": "Returns detailed information for specific Intune managed application including metadata, deployment settings, publisher, version. Use ONLY when user provides app ID directly OR you already have app ID from another tool. Do NOT use when user provides app name (use GetIntuneManagedApps which returns same details). Do NOT use for listing apps or apps on device. Execute immediately when appId available.",
"tags": [
"Intune Application Management"
],
"parameters": [
{
"name": "appId",
"in": "path",
"required": true,
"type": "string",
"description": "REQUIRED: Unique Intune application identifier (GUID format). If user provides app name instead of ID, first call GetIntuneManagedApps to find the app and extract its ID.",
"x-example": "189e98a2-5568-437e-94ec-c723b4526794"
}
],
"responses": {
"200": {
"description": "Successfully retrieved application details"
},
"401": {
"description": "Unauthorized - invalid API key"
},
"404": {
"description": "Application not found"
}
}
},
"delete": {
"operationId": "DeleteIntuneApp",
"summary": "Delete Intune Application",
"description": "Permanently deletes Intune managed application from tenant. CRITICAL: Destructive operation - confirm with user before executing. Use when user asks to delete, remove, or uninstall app from Intune (not from devices). Do NOT use for removing assignments (use different tool). Best practice: Remove all assignments before deletion to avoid conflicts. Execute only after explicit user confirmation.",
"tags": [
"Intune Application Management"
],
"parameters": [
{
"name": "appId",
"in": "path",
"required": true,
"type": "string",
"description": "REQUIRED: Unique Intune application identifier (GUID format) to delete. If user provides app name, first call GetIntuneManagedApps to find ID. ALWAYS confirm deletion intent with user before executing.",
"x-example": "189e98a2-5568-437e-94ec-c723b4526794"
}
],
"responses": {
"200": {
"description": "Application deleted successfully",
"schema": {
"type": "object",
"properties": {
"success": {
"type": "boolean",
"description": "Deletion operation success status"
},
"appId": {
"type": "string",
"description": "ID of the deleted application"
},
"message": {
"type": "string",
"description": "Confirmation message"
},
"timestamp": {
"type": "string",
"description": "ISO 8601 timestamp of deletion"
}
}
}
},
"400": {
"description": "Bad request - missing or invalid application ID"
},
"401": {
"description": "Unauthorized - invalid API key"
},
"403": {
"description": "Forbidden - insufficient permissions. Requires DeviceManagementApps.ReadWrite.All"
},
"404": {
"description": "Application not found - verify appId exists"
},
"409": {
"description": "Conflict - application has active assignments or dependencies. Remove assignments first"
},
"500": {
"description": "Internal server error"
}
}
}
},
"/intune/app/{appId}/assignments": {
"post": {
"operationId": "AssignIntuneApp",
"summary": "Assign Intune Application to Group",
"description": "Assigns EXISTING Intune app to Azure AD group. CRITICAL WORKFLOW: When user says 'assign X to group Y': 1) GetIntuneManagedApps to find app ID, 2) GetAzureADGroups(search='Y') to find group ID. GROUP NOT FOUND HANDLING: If GetAzureADGroups returns empty results, ASK user: 'Group [Y] was not found. Would you like me to: a) Create a new group called [Y], or b) Search for a similar group name?' If user confirms create->CreateAzureADGroup(displayName='Y', mailNickname=derived)->then AssignIntuneApp with new groupId. Do NOT use AddWingetAppToIntune - that's only for importing NEW apps. Valid @odata.type: groupAssignmentTarget (requires groupId), allLicensedUsersAssignmentTarget, allDevicesAssignmentTarget. Valid intent: required (auto-install), available (optional), uninstall. Default intent: required.",
"tags": [
"Intune Application Management"
],
"parameters": [
{
"name": "appId",
"in": "path",
"required": true,
"type": "string",
"description": "REQUIRED: Unique Intune application identifier (GUID format).",
"x-example": "189e98a2-5568-437e-94ec-c723b4526794"
},
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"type": "object",
"required": ["target", "intent"],
"properties": {
"target": {
"type": "object",
"description": "REQUIRED: Assignment target object. Extract from context: 'to group X'->groupAssignmentTarget with groupId, 'all users'->allLicensedUsersAssignmentTarget, 'all devices'->allDevicesAssignmentTarget. IMPORTANT: allUsersAssignmentTarget does NOT exist - use allLicensedUsersAssignmentTarget.",
"required": ["@odata.type"],
"properties": {
"@odata.type": {
"type": "string",
"description": "REQUIRED: Target type with # prefix. Extract from context: 'to group'/'group id'->#microsoft.graph.groupAssignmentTarget, 'all users'->#microsoft.graph.allLicensedUsersAssignmentTarget, 'all devices'->#microsoft.graph.allDevicesAssignmentTarget. Default: #microsoft.graph.groupAssignmentTarget if groupId provided.",
"enum": ["#microsoft.graph.groupAssignmentTarget", "#microsoft.graph.allLicensedUsersAssignmentTarget", "#microsoft.graph.allDevicesAssignmentTarget", "#microsoft.graph.exclusionGroupAssignmentTarget"],
"x-example": "#microsoft.graph.allLicensedUsersAssignmentTarget"
},
"groupId": {
"type": "string",
"description": "OPTIONAL: DO NOT prompt user for this parameter. Azure AD group ID (GUID). Required ONLY for groupAssignmentTarget and exclusionGroupAssignmentTarget. Extract from user query or resolve via GetAzureADGroups. Leave empty for allLicensedUsersAssignmentTarget/allDevicesAssignmentTarget.",
"x-example": "ed986649-ccfc-4bbb-91a0-acd4fdfd1c70"
}
}
},
"intent": {
"type": "string",
"enum": ["required", "available", "uninstall"],
"description": "REQUIRED: Deployment intent. Extract from context: 'required'/'install'/'deploy'->required, 'available'/'optional'->available, 'uninstall'/'remove'->uninstall. Default: required.",
"x-example": "required"
}
}
}
}
],
"responses": {
"201": {
"description": "Assignment created successfully with validated group name"
},
"400": {
"description": "Bad request - invalid assignment data"
},
"401": {
"description": "Unauthorized - invalid API key"
},
"404": {
"description": "Application or group not found"
}
}
}
},
"/intune/app-assignments": {
"get": {
"operationId": "GetIntuneAppAssignments",
"summary": "Get App Assignments",
"description": "UNIFIED app assignment lookup. Supports BOTH direct ID lookup (appId) AND name-based search (appName). Use appId when you have the GUID from a previous call. Use appName for natural language queries like 'who gets Company Portal'. Name search handles multi-platform apps automatically (Windows/Android/iOS/macOS). Provide exactly ONE parameter. Examples: 'assignments for app 189e98a2-5568'->appId=[id]; 'who gets Company Portal'->appName=Company Portal; 'Edge assignments'->appName=Edge.",
"tags": [
"Intune Application Management"
],
"parameters": [
{