-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathAsset Categorization Script
157 lines (157 loc) · 16 KB
/
Asset Categorization Script
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
<mxfile host="app.diagrams.net" modified="2023-02-06T14:08:36.593Z" agent="5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36 OPR/94.0.0.0" etag="-dJZejmvdIEu9WHbAfaJ" version="20.6.0" type="github">
<diagram id="6a731a19-8d31-9384-78a2-239565b7b9f0" name="Page-1">
<mxGraphModel dx="2156" dy="124" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1169" pageHeight="827" background="none" math="0" shadow="0">
<root>
<mxCell id="0" />
<mxCell id="1" parent="0" />
<mxCell id="56" value="<p style="line-height: 0%;"><font style="font-size: 20px;">Asset Categorization Script Flowchart</font></p>" style="strokeColor=#BAC8D3;fillColor=#23445D;fontSize=21;strokeWidth=2;fontFamily=Helvetica;html=1;fontColor=#FFFFFF;fontStyle=0;spacingBottom=8;spacingRight=0;spacingLeft=83;verticalAlign=top;align=center;" parent="1" vertex="1">
<mxGeometry x="154" y="880" width="1606" height="50" as="geometry" />
</mxCell>
<mxCell id="57" value="Object Class" style="strokeColor=#BAC8D3;fillColor=#23445D;fontSize=16;strokeWidth=2;horizontal=0;fontFamily=Helvetica;html=1;fontColor=#FFFFFF;fontStyle=0" parent="1" vertex="1">
<mxGeometry x="154" y="930.5" width="50" height="399.5" as="geometry" />
</mxCell>
<mxCell id="58" value="Authentication" style="strokeColor=#BAC8D3;fillColor=#5d7f99;fontSize=13;strokeWidth=2;horizontal=0;fontFamily=Helvetica;html=1;labelBackgroundColor=none;fontColor=#FFFFFF;" parent="1" vertex="1">
<mxGeometry x="204" y="930.5" width="40" height="100" as="geometry" />
</mxCell>
<mxCell id="59" value="v 1.0" style="strokeColor=#BAC8D3;fillColor=#5d7f99;fontSize=19;strokeWidth=2;fontFamily=Helvetica;html=1;labelBackgroundColor=none;fontColor=#FFFFFF;" parent="1" vertex="1">
<mxGeometry x="154" y="880" width="90" height="50.5" as="geometry" />
</mxCell>
<mxCell id="60" value="Devices" style="strokeColor=#BAC8D3;fillColor=#5d7f99;fontSize=13;strokeWidth=2;horizontal=0;fontFamily=Helvetica;html=1;labelBackgroundColor=none;fontColor=#FFFFFF;" parent="1" vertex="1">
<mxGeometry x="204" y="1030.5" width="40" height="100" as="geometry" />
</mxCell>
<mxCell id="61" value="Users" style="strokeColor=#BAC8D3;fillColor=#5d7f99;fontSize=13;strokeWidth=2;horizontal=0;fontFamily=Helvetica;html=1;labelBackgroundColor=none;fontColor=#FFFFFF;" parent="1" vertex="1">
<mxGeometry x="204" y="1130.5" width="40" height="100" as="geometry" />
</mxCell>
<mxCell id="63" value="Attribute<br style="font-size: 13px;">Codification" style="strokeColor=#BAC8D3;fillColor=#5d7f99;fontSize=13;strokeWidth=2;horizontal=0;fontFamily=Helvetica;html=1;labelBackgroundColor=none;fontColor=#FFFFFF;" parent="1" vertex="1">
<mxGeometry x="204" y="1230.5" width="40" height="100" as="geometry" />
</mxCell>
<mxCell id="68" value="" style="strokeColor=#FFFFFF;fillColor=#BAC8D3;fontSize=18;strokeWidth=2;fontFamily=Helvetica;html=1;opacity=60;" parent="1" vertex="1">
<mxGeometry x="244" y="930.5" width="1516" height="100" as="geometry" />
</mxCell>
<mxCell id="69" value="" style="strokeColor=#FFFFFF;fillColor=#BAC8D3;fontSize=18;strokeWidth=2;fontFamily=Helvetica;html=1;opacity=90;" parent="1" vertex="1">
<mxGeometry x="244" y="1030.5" width="1516" height="100" as="geometry" />
</mxCell>
<mxCell id="70" value="" style="strokeColor=#FFFFFF;fillColor=#BAC8D3;fontSize=18;strokeWidth=2;fontFamily=Helvetica;html=1;opacity=60;" parent="1" vertex="1">
<mxGeometry x="244" y="1130.5" width="1516" height="100" as="geometry" />
</mxCell>
<mxCell id="71" value="" style="strokeColor=#FFFFFF;fillColor=#BAC8D3;fontSize=18;strokeWidth=2;fontFamily=Helvetica;html=1;opacity=90;" parent="1" vertex="1">
<mxGeometry x="244" y="1230.5" width="1516" height="100" as="geometry" />
</mxCell>
<mxCell id="89" style="edgeStyle=orthogonalEdgeStyle;rounded=1;jumpStyle=none;html=1;labelBackgroundColor=#ffffff;startArrow=none;startFill=0;endArrow=classic;jettySize=auto;orthogonalLoop=1;strokeColor=#0C343D;strokeWidth=3;fontFamily=Helvetica;fontSize=11;fontColor=#000000;" parent="1" source="xAeqR1MzocwYhzqEdOYY-156" target="92" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="580" y="981" />
<mxPoint x="580" y="1181" />
</Array>
<mxPoint x="600.3945578231292" y="980.5" as="sourcePoint" />
</mxGeometry>
</mxCell>
<mxCell id="90" value="<font style="font-size: 8px;"><span style="color: rgb(255, 255, 255); font-size: 8px;">Get registered App's Client Secret</span><br style="color: rgb(255, 255, 255); font-size: 8px;"><span style="color: rgb(255, 255, 255); font-size: 8px;">Auth Token and MSAL.PS Module</span></font><font style="font-size: 8px;" color="#ffffff"><br style="font-size: 8px;"></font>" style="rounded=1;fillColor=#23445D;strokeColor=none;strokeWidth=2;fontFamily=Helvetica;html=1;gradientColor=none;verticalAlign=middle;fontSize=8;" parent="1" vertex="1">
<mxGeometry x="270.3945578231293" y="955.5" width="127" height="50" as="geometry" />
</mxCell>
<mxCell id="91" value="<font style="font-size: 8px;">Get Devices owned <br style="font-size: 8px;">by each User</font>" style="rounded=1;fillColor=#23445D;strokeColor=none;strokeWidth=2;fontFamily=Helvetica;html=1;gradientColor=none;fontSize=8;" parent="1" vertex="1">
<mxGeometry x="775.004761904762" y="1055.5" width="127" height="50" as="geometry" />
</mxCell>
<mxCell id="92" value="<span style="font-size: 8px;">Get a list of all Users</span>" style="rounded=1;fillColor=#23445D;strokeColor=none;strokeWidth=2;fontFamily=Helvetica;html=1;gradientColor=none;fontSize=8;" parent="1" vertex="1">
<mxGeometry x="605.0037414965986" y="1155.5" width="127" height="50" as="geometry" />
</mxCell>
<mxCell id="97" value="Sort each Device from the <br style="font-size: 8px;">most recent to the least" style="rounded=1;fillColor=#23445D;strokeColor=none;strokeWidth=2;fontFamily=Helvetica;html=1;gradientColor=none;fontSize=8;" parent="1" vertex="1">
<mxGeometry x="975.0049659863944" y="1055.5" width="127" height="50" as="geometry" />
</mxCell>
<mxCell id="99" value="Codify<br>onPremisesDistinguishedName <br style="font-size: 8px;">into the Device's<br>extensionAttribute" style="rounded=1;fillColor=#23445D;strokeColor=none;strokeWidth=2;gradientColor=none;fontFamily=Helvetica;html=1;fontSize=8;" parent="1" vertex="1">
<mxGeometry x="1565.6680952380952" y="1055.5" width="127" height="50" as="geometry" />
</mxCell>
<mxCell id="107" value="If present and not aligned,&nbsp;<br style="font-size: 8px;">update the extensionAttribute<br style="font-size: 8px;">on the old Devices<br style="font-size: 8px;">with correct codification" style="rounded=1;fillColor=#23445D;strokeColor=none;strokeWidth=2;gradientColor=none;fontFamily=Helvetica;html=1;fontSize=8;" parent="1" vertex="1">
<mxGeometry x="1375.0816326530612" y="1055.5" width="127" height="50" as="geometry" />
</mxCell>
<mxCell id="108" value="Check each Device's <br>extensionAttribute <br style="font-size: 8px;">and check if it's aligned <br style="font-size: 8px;">with User Properties" style="rounded=1;fillColor=#23445D;strokeColor=none;strokeWidth=2;gradientColor=none;fontFamily=Helvetica;html=1;fontSize=8;" parent="1" vertex="1">
<mxGeometry x="1144.9978911564624" y="1055.5" width="127" height="50" as="geometry" />
</mxCell>
<mxCell id="110" value="If present and aligned,<br style="font-size: 8px;">scan for new devices,<br style="font-size: 8px;">and copy the attribute to<br style="font-size: 8px;">un-processed devices" style="rounded=1;fillColor=#23445D;strokeColor=none;strokeWidth=2;gradientColor=none;fontFamily=Helvetica;html=1;fontSize=8;" parent="1" vertex="1">
<mxGeometry x="1375.0816326530612" y="1155.5" width="127" height="50" as="geometry" />
</mxCell>
<mxCell id="111" value="If not present, codify the <br style="font-size: 8px;">extensionAttribute and<br style="font-size: 8px;">print it to the Device Objects" style="rounded=1;fillColor=#23445D;strokeColor=none;strokeWidth=2;gradientColor=none;fontFamily=Helvetica;html=1;fontSize=8;" parent="1" vertex="1">
<mxGeometry x="1375.0816326530612" y="1255.5" width="127" height="50" as="geometry" />
</mxCell>
<mxCell id="114" value="" style="edgeStyle=elbowEdgeStyle;elbow=horizontal;strokeWidth=3;strokeColor=#0C343D;fontFamily=Helvetica;html=1;" parent="1" source="92" target="91" edge="1">
<mxGeometry x="161.44897959183675" y="830.5" width="131.97278911564624" height="100" as="geometry">
<mxPoint x="161.44897959183675" y="930.5" as="sourcePoint" />
<mxPoint x="293.421768707483" y="830.5" as="targetPoint" />
<Array as="points">
<mxPoint x="839" y="1140" />
<mxPoint x="370" y="1610" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="119" value="" style="edgeStyle=elbowEdgeStyle;elbow=horizontal;strokeWidth=3;strokeColor=#0C343D;fontFamily=Helvetica;html=1;" parent="1" source="91" target="97" edge="1">
<mxGeometry x="161.44897959183675" y="830.5" width="131.97278911564624" height="100" as="geometry">
<mxPoint x="161.44897959183675" y="930.5" as="sourcePoint" />
<mxPoint x="293.421768707483" y="830.5" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="133" value="" style="edgeStyle=elbowEdgeStyle;elbow=horizontal;strokeWidth=3;strokeColor=#0C343D;fontFamily=Helvetica;html=1;" parent="1" source="97" target="108" edge="1">
<mxGeometry x="161.44897959183675" y="830.5" width="131.97278911564624" height="100" as="geometry">
<mxPoint x="161.44897959183675" y="930.5" as="sourcePoint" />
<mxPoint x="293.421768707483" y="830.5" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="136" value="" style="edgeStyle=elbowEdgeStyle;elbow=horizontal;strokeWidth=3;strokeColor=#0C343D;fontFamily=Helvetica;html=1;" parent="1" source="111" target="99" edge="1">
<mxGeometry x="161.44897959183675" y="830.5" width="131.97278911564624" height="100" as="geometry">
<mxPoint x="161.44897959183675" y="930.5" as="sourcePoint" />
<mxPoint x="293.421768707483" y="830.5" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="137" value="" style="edgeStyle=elbowEdgeStyle;elbow=horizontal;strokeWidth=3;strokeColor=#0C343D;fontFamily=Helvetica;html=1;" parent="1" source="107" target="99" edge="1">
<mxGeometry x="161.44897959183675" y="830.5" width="131.97278911564624" height="100" as="geometry">
<mxPoint x="161.44897959183675" y="930.5" as="sourcePoint" />
<mxPoint x="293.421768707483" y="830.5" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="xAeqR1MzocwYhzqEdOYY-145" value="" style="edgeStyle=elbowEdgeStyle;elbow=horizontal;strokeWidth=3;strokeColor=#0C343D;fontFamily=Helvetica;html=1;" edge="1" parent="1" source="108" target="107">
<mxGeometry x="-14.241020408163251" y="830.07" width="131.97278911564624" height="100" as="geometry">
<mxPoint x="1267.7249659863942" y="1080.07" as="sourcePoint" />
<mxPoint x="1553.0378911564626" y="1080.07" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="xAeqR1MzocwYhzqEdOYY-147" value="" style="edgeStyle=elbowEdgeStyle;elbow=horizontal;strokeWidth=3;strokeColor=#0C343D;fontFamily=Helvetica;html=1;" edge="1" parent="1" source="108" target="111">
<mxGeometry x="-14.961020408163279" y="830" width="131.97278911564624" height="100" as="geometry">
<mxPoint x="1267.0049659863942" y="1080" as="sourcePoint" />
<mxPoint x="1374.3616326530612" y="1180.5" as="targetPoint" />
<Array as="points" />
</mxGeometry>
</mxCell>
<mxCell id="xAeqR1MzocwYhzqEdOYY-148" value="Get <br>onPremisesDistinguishedName<br style="font-size: 8px;">from User Properties" style="rounded=1;fillColor=#23445D;strokeColor=none;strokeWidth=2;fontFamily=Helvetica;html=1;gradientColor=none;fontSize=8;" vertex="1" parent="1">
<mxGeometry x="975.0049659863945" y="1155.5" width="127" height="50" as="geometry" />
</mxCell>
<mxCell id="xAeqR1MzocwYhzqEdOYY-149" value="" style="edgeStyle=elbowEdgeStyle;elbow=horizontal;strokeWidth=3;strokeColor=#0C343D;fontFamily=Helvetica;html=1;" edge="1" parent="1" source="91" target="xAeqR1MzocwYhzqEdOYY-148">
<mxGeometry x="161.44897959183675" y="830.07" width="131.97278911564624" height="100" as="geometry">
<mxPoint x="945" y="1090" as="sourcePoint" />
<mxPoint x="1316.4149659863942" y="1080.07" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="xAeqR1MzocwYhzqEdOYY-151" value="" style="edgeStyle=elbowEdgeStyle;elbow=horizontal;strokeWidth=3;strokeColor=#0C343D;fontFamily=Helvetica;html=1;" edge="1" parent="1" source="xAeqR1MzocwYhzqEdOYY-148" target="111">
<mxGeometry x="-39.96102040816325" y="1030.07" width="131.97278911564624" height="100" as="geometry">
<mxPoint x="1242.0049659863942" y="1280.07" as="sourcePoint" />
<mxPoint x="1527.3178911564626" y="1280.07" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="xAeqR1MzocwYhzqEdOYY-154" value="" style="edgeStyle=elbowEdgeStyle;elbow=horizontal;strokeWidth=3;strokeColor=#0C343D;fontFamily=Helvetica;html=1;" edge="1" parent="1" target="110">
<mxGeometry x="-14.50102040816327" y="830" width="131.97278911564624" height="100" as="geometry">
<mxPoint x="1272.4578911564627" y="1080.5" as="sourcePoint" />
<mxPoint x="1375.5416326530612" y="1280.5" as="targetPoint" />
<Array as="points" />
</mxGeometry>
</mxCell>
<mxCell id="xAeqR1MzocwYhzqEdOYY-156" value="<span style="color: rgb(255, 255, 255); font-size: 8px;">Authenticate to Microsoft.Graph</span><br style="color: rgb(255, 255, 255); font-size: 8px;"><span style="color: rgb(255, 255, 255); font-size: 8px;">using obscured&nbsp;</span><span style="color: rgb(255, 255, 255); font-size: 8px;">Auth Token</span><font style="font-size: 8px;" color="#ffffff"><br style="font-size: 8px;"></font>" style="rounded=1;fillColor=#23445D;strokeColor=none;strokeWidth=2;fontFamily=Helvetica;html=1;gradientColor=none;verticalAlign=middle;fontSize=8;" vertex="1" parent="1">
<mxGeometry x="440.0045578231293" y="955.5" width="127" height="50" as="geometry" />
</mxCell>
<mxCell id="xAeqR1MzocwYhzqEdOYY-157" value="" style="edgeStyle=elbowEdgeStyle;elbow=horizontal;strokeWidth=3;strokeColor=#0C343D;fontFamily=Helvetica;html=1;" edge="1" parent="1" target="xAeqR1MzocwYhzqEdOYY-156">
<mxGeometry x="-343.55102040816325" y="730.0699999999999" width="131.97278911564624" height="100" as="geometry">
<mxPoint x="397.0047619047623" y="980.0699999999999" as="sourcePoint" />
<mxPoint x="470" y="980" as="targetPoint" />
</mxGeometry>
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>