
1
00:00:00,000 –> 00:00:02,640
Everyone’s using Python in Power Platform wrong.
2
00:00:02,640 –> 00:00:03,720
Yes, wrong.
3
00:00:03,720 –> 00:00:05,360
Microsoft hands people a chef’s knife
4
00:00:05,360 –> 00:00:07,600
and half of them are using it to spread butter.
5
00:00:07,600 –> 00:00:08,680
You’ve probably seen it.
6
00:00:08,680 –> 00:00:12,080
Someone here’s Python now runs natively in Power Platform
7
00:00:12,080 –> 00:00:14,960
and immediately tries to rebuild an ETL pipeline,
8
00:00:14,960 –> 00:00:17,520
then wonders why their flow times out like a toddler
9
00:00:17,520 –> 00:00:18,920
denied an iPad.
10
00:00:18,920 –> 00:00:19,960
Here’s the problem.
11
00:00:19,960 –> 00:00:22,320
Microsoft quietly dropped native Python support
12
00:00:22,320 –> 00:00:24,240
through something called the code interpreter.
13
00:00:24,240 –> 00:00:27,120
It’s astonishingly convenient, literally plug a Python command
14
00:00:27,120 –> 00:00:29,960
into co-pilot and it runs right there in your environment.
15
00:00:29,960 –> 00:00:32,840
Yet, somehow everyone keeps over complicating things.
16
00:00:32,840 –> 00:00:35,640
They still deploy Azure functions for trivial file conversions
17
00:00:35,640 –> 00:00:36,840
or numerical calculations
18
00:00:36,840 –> 00:00:39,160
that could have been done right inside the chat prompt.
19
00:00:39,160 –> 00:00:41,000
And yes, the inverse is equally foolish,
20
00:00:41,000 –> 00:00:43,320
running massive enterprise workloads inside a prompt
21
00:00:43,320 –> 00:00:44,600
like it’s a hobby project.
22
00:00:44,600 –> 00:00:46,440
The confusion stems from this misconception
23
00:00:46,440 –> 00:00:48,240
that both tools do the same thing.
24
00:00:48,240 –> 00:00:49,040
They don’t.
25
00:00:49,040 –> 00:00:52,520
Once a sandbox scratch pad designed for quick experimentation,
26
00:00:52,520 –> 00:00:55,480
the others are fully managed production grade runtime.
27
00:00:55,480 –> 00:00:57,960
Mixing them up is like confusing microwave popcorn
28
00:00:57,960 –> 00:00:59,160
with a Michelin kitchen.
29
00:00:59,160 –> 00:01:00,280
So let’s simplify.
30
00:01:00,280 –> 00:01:03,880
Code interpreter is instant ramen, fast packaged, self-contained,
31
00:01:03,880 –> 00:01:05,080
but no one should live on it.
32
00:01:05,080 –> 00:01:06,760
Azure functions, on the other hand,
33
00:01:06,760 –> 00:01:09,560
is the full culinary setup, knives, pans,
34
00:01:09,560 –> 00:01:11,240
and fire extinguishers included.
35
00:01:11,240 –> 00:01:12,680
By the end of this explanation,
36
00:01:12,680 –> 00:01:14,360
you’ll know exactly when to use which
37
00:01:14,360 –> 00:01:16,440
and when to stop embarrassing your tenant admins
38
00:01:16,440 –> 00:01:18,840
with half-baked data automation experiments.
39
00:01:18,840 –> 00:01:21,880
Now let’s talk about where all this confusion really starts.
40
00:01:21,880 –> 00:01:25,000
Inside Microsoft’s shiny new Python sandbox.
41
00:01:25,000 –> 00:01:28,120
Enter the code interpreter, Python’s new sandbox.
42
00:01:28,120 –> 00:01:30,280
The code interpreter didn’t emerge from nowhere.
43
00:01:30,280 –> 00:01:32,360
It crawled out of co-pilot studio.
44
00:01:32,360 –> 00:01:34,120
The part of Microsoft 365
45
00:01:34,120 –> 00:01:36,920
where chatbots and automation meet polite chaos.
46
00:01:36,920 –> 00:01:39,320
For years, makers begged for native scripting
47
00:01:39,320 –> 00:01:41,080
instead of clunky connectors.
48
00:01:41,080 –> 00:01:43,640
Microsoft finally relented and suddenly Python appeared
49
00:01:43,640 –> 00:01:45,080
like divine intervention.
50
00:01:45,080 –> 00:01:46,920
Well, almost.
51
00:01:46,920 –> 00:01:47,960
Here’s how it actually works.
52
00:01:47,960 –> 00:01:50,040
When you type a prompt in co-pilot studio,
53
00:01:50,040 –> 00:01:53,720
say convert this CSV into an Excel report with a pie chart.
54
00:01:53,720 –> 00:01:56,200
The underlying large language model does two things.
55
00:01:56,200 –> 00:01:58,840
First, it writes a Python script to perform the task.
56
00:01:58,840 –> 00:02:01,560
Then instead of sending that code off to the cloud’s wilderness,
57
00:02:01,560 –> 00:02:03,640
it runs it inside a sealed sandbox.
58
00:02:03,640 –> 00:02:05,880
Think of it as a glass terrarium for Python.
59
00:02:05,880 –> 00:02:09,400
Alive, self-contained, but absolutely forbidden from climbing out.
60
00:02:09,400 –> 00:02:11,640
All execution happens within that sandbox.
61
00:02:11,640 –> 00:02:13,560
It can read input files, transform them,
62
00:02:13,560 –> 00:02:15,720
calculate statistics, even draw charts.
63
00:02:15,720 –> 00:02:17,800
You get deterministic repeatable results
64
00:02:17,800 –> 00:02:19,800
because the code doesn’t change between runs.
65
00:02:19,800 –> 00:02:21,640
It’s generated once during testing,
66
00:02:21,640 –> 00:02:23,960
frozen, and re-executed consistently.
67
00:02:23,960 –> 00:02:26,920
No mysterious AI hallucinations, no inconsistent outputs,
68
00:02:26,920 –> 00:02:28,280
just reliable automation.
69
00:02:28,280 –> 00:02:30,840
But here’s the governance twist most users ignore.
70
00:02:30,840 –> 00:02:32,920
The feature is disabled by default.
71
00:02:32,920 –> 00:02:35,720
Administrators must explicitly enable code generation
72
00:02:35,720 –> 00:02:38,840
and execution in co-pilot inside the power platform admin center
73
00:02:38,840 –> 00:02:40,600
on a per-environment basis.
74
00:02:40,600 –> 00:02:41,080
Why?
75
00:02:41,080 –> 00:02:43,960
Because letting random users execute arbitrary code
76
00:02:43,960 –> 00:02:46,360
in corporate environments is minor detail,
77
00:02:46,360 –> 00:02:47,480
a potential catastrophe.
78
00:02:47,480 –> 00:02:51,000
Microsoft wisely forces admins to flip the switch intentionally.
79
00:02:51,000 –> 00:02:52,600
So what exactly can it do when enabled?
80
00:02:52,600 –> 00:02:54,040
Quite a lot within its walls.
81
00:02:54,040 –> 00:02:55,880
You can use it for lightweight analytics,
82
00:02:55,880 –> 00:02:58,840
CSV to excel transformations, file conversions,
83
00:02:58,840 –> 00:03:00,440
or simple dataverse automation.
84
00:03:00,440 –> 00:03:02,760
It’s impressive for tasks like cleaning data,
85
00:03:02,760 –> 00:03:05,080
summarizing sales and generating visual reports,
86
00:03:05,080 –> 00:03:07,960
or without leaving power automate or co-pilot studio.
87
00:03:07,960 –> 00:03:09,960
For analysts, this is revolutionary.
88
00:03:09,960 –> 00:03:12,200
No need for external scripts, task schedules,
89
00:03:12,200 –> 00:03:13,640
or deployed infrastructure.
90
00:03:13,640 –> 00:03:16,920
Naturally, the limitations arrive just as you start to enjoy yourself.
91
00:03:16,920 –> 00:03:18,120
The runtime is read only.
92
00:03:18,120 –> 00:03:21,160
No database writes except through permitted APIs.
93
00:03:21,160 –> 00:03:25,080
There’s a 512 megabyte file cap, timeouts on longer executions,
94
00:03:25,080 –> 00:03:27,080
and a ban on external API calls,
95
00:03:27,080 –> 00:03:29,320
meaning no direct web requests, no pip installs,
96
00:03:29,320 –> 00:03:30,760
and no clever workarounds.
97
00:03:30,760 –> 00:03:32,600
It’s a closed circuit, intentionally tame
98
00:03:32,600 –> 00:03:35,720
to protect data integrity and prevent creative disasters.
99
00:03:35,720 –> 00:03:38,600
And yes, that frustrates developers who insist on infinite control,
100
00:03:38,600 –> 00:03:39,800
but in truth, that’s the point.
101
00:03:39,800 –> 00:03:43,160
The code interpreter democratizes Python for business users
102
00:03:43,160 –> 00:03:45,720
without handing them the keys to the data center.
103
00:03:45,720 –> 00:03:48,360
It makes Python safe, like giving toddlers dull scissors.
104
00:03:48,360 –> 00:03:50,440
You can experiment, automate, and perform
105
00:03:50,440 –> 00:03:53,640
repeatable data prep, but you won’t melt the firewall in the process.
106
00:03:53,640 –> 00:03:55,480
In short, it’s the friendliest Python runtime
107
00:03:55,480 –> 00:03:58,520
Microsoft has ever shipped, a sandbox for curiosity,
108
00:03:58,520 –> 00:04:00,440
not a platform for pipelines.
109
00:04:00,440 –> 00:04:02,760
But once your ambitions exceed that little garden,
110
00:04:02,760 –> 00:04:05,240
when you start thinking about 10,000 records,
111
00:04:05,240 –> 00:04:09,000
nightly jobs, or integrations that stretch beyond Microsoft’s walls,
112
00:04:09,000 –> 00:04:10,600
you’ll hit the fence fast.
113
00:04:10,600 –> 00:04:13,080
That’s the moment when the instant ramen runs out
114
00:04:13,080 –> 00:04:15,640
and you realize you actually need a proper kitchen.
115
00:04:15,640 –> 00:04:17,720
And that kitchen, it’s as your functions,
116
00:04:17,720 –> 00:04:20,120
as your functions, Python without training wheels.
117
00:04:20,120 –> 00:04:21,560
Now step out of the sandbox.
118
00:04:21,560 –> 00:04:24,760
Azure Functions is where Python stops pretending to be harmless.
119
00:04:24,760 –> 00:04:27,080
It’s the same language, but now it’s running with full access
120
00:04:27,080 –> 00:04:31,640
to real infrastructure, network endpoints, and production systems.
121
00:04:31,640 –> 00:04:33,640
Think of it as moving from a chemistry set
122
00:04:33,640 –> 00:04:36,120
in your kitchen to a fully equipped laboratory,
123
00:04:36,120 –> 00:04:39,160
flammable materials, yes, but also protocols in ventilation.
124
00:04:39,160 –> 00:04:40,520
Here’s the simplest definition.
125
00:04:40,520 –> 00:04:43,320
Azure Functions is Microsoft’s serverless platform
126
00:04:43,320 –> 00:04:44,760
for running code on demand.
127
00:04:44,760 –> 00:04:47,160
You don’t worry about servers, scaling, or maintenance.
128
00:04:47,160 –> 00:04:49,160
You write a Python function, deploy it,
129
00:04:49,160 –> 00:04:51,880
and Azure handles the rest, triggering your code
130
00:04:51,880 –> 00:04:54,200
whenever something happens, an HTTP request,
131
00:04:54,200 –> 00:04:56,360
a queue message, or a schedule timer.
132
00:04:56,360 –> 00:04:59,320
In Power Platform terms, it’s the muscle behind the low code facade,
133
00:04:59,320 –> 00:05:01,160
your flow or PowerApp sensor request
134
00:05:01,160 –> 00:05:04,520
and the function executes precise, versioned logic.
135
00:05:04,520 –> 00:05:07,640
Architecturally, it’s night and day compared to code interpreter.
136
00:05:07,640 –> 00:05:11,080
The code interpreter executes tiny Python snippets within a prompt,
137
00:05:11,080 –> 00:05:13,480
stateless, context limited, and ephemeral.
138
00:05:13,480 –> 00:05:17,000
Azure Functions in contrast behaves like an event-driven microservice.
139
00:05:17,000 –> 00:05:18,920
It can persist state externally
140
00:05:18,920 –> 00:05:21,240
fan out millions of concurrent executions
141
00:05:21,240 –> 00:05:24,040
and stay alive long enough to complete actual workloads.
142
00:05:24,040 –> 00:05:27,400
It’s infrastructure without visible servers, hence serverless.
143
00:05:27,400 –> 00:05:29,960
Developers love it for one big reason, freedom.
144
00:05:29,960 –> 00:05:33,880
You can import Python packages, manage dependencies through requirements.
145
00:05:33,880 –> 00:05:36,200
TXT or use the new V2 programming model
146
00:05:36,200 –> 00:05:37,960
which finally feels like standard Python
147
00:05:37,960 –> 00:05:39,640
instead of an exotic Azure dialect.
148
00:05:39,640 –> 00:05:41,640
You get proper version control, testing pipelines,
149
00:05:41,640 –> 00:05:43,240
and CI/CD integration.
150
00:05:43,240 –> 00:05:47,240
Small tweak, push to GitHub, trigger deployment, done.
151
00:05:47,240 –> 00:05:49,720
No mysterious prompts, no LLM interpretations,
152
00:05:49,720 –> 00:05:51,960
just code running exactly as you wrote it.
153
00:05:51,960 –> 00:05:54,680
Security, meanwhile, stops being a passive checkbox
154
00:05:54,680 –> 00:05:56,920
and becomes an engineering discipline.
155
00:05:56,920 –> 00:05:59,160
Functions can use API keys for simple access,
156
00:05:59,160 –> 00:06:00,840
or ask for secure app calls,
157
00:06:00,840 –> 00:06:03,000
or managed identities that authenticate
158
00:06:03,000 –> 00:06:05,720
to other Azure resources without storing secrets.
159
00:06:05,720 –> 00:06:08,040
You can even wrap them inside virtual networks
160
00:06:08,040 –> 00:06:10,440
ensuring only internal services can call them.
161
00:06:10,440 –> 00:06:13,400
In enterprise terms, this is gold,
162
00:06:13,400 –> 00:06:16,200
auditable, enforceable, and fully logged.
163
00:06:16,200 –> 00:06:18,520
Scalability is the part that makes you blink.
164
00:06:18,520 –> 00:06:21,800
Azure Functions scales automatically from zero to infinity,
165
00:06:21,800 –> 00:06:25,160
or more precisely from idle to as many concurrent executions
166
00:06:25,160 –> 00:06:26,600
as your account allows.
167
00:06:26,600 –> 00:06:29,000
When no one calls your function, it sleeps.
168
00:06:29,000 –> 00:06:32,280
When a thousand power automate flows invocate simultaneously,
169
00:06:32,280 –> 00:06:34,040
it wakes up a thousand times over.
170
00:06:34,040 –> 00:06:35,720
Each instance operates independently,
171
00:06:35,720 –> 00:06:37,240
then disappears when it’s done.
172
00:06:37,240 –> 00:06:39,160
The billing meters only when it runs,
173
00:06:39,160 –> 00:06:41,240
so cost aligns perfectly with usage.
174
00:06:41,240 –> 00:06:42,920
Code interpreter can’t do this.
175
00:06:42,920 –> 00:06:46,600
It’s fixed to a single execution window inside one chat session.
176
00:06:46,600 –> 00:06:49,880
Governance and monitoring are equally serious.
177
00:06:49,880 –> 00:06:52,440
In Azure, every function emits logs and metrics.
178
00:06:52,440 –> 00:06:54,200
You can view execution histories,
179
00:06:54,200 –> 00:06:57,240
exceptions, response times, and even memory footprints.
180
00:06:57,240 –> 00:06:59,640
Application insights and log analytics
181
00:06:59,640 –> 00:07:03,160
turn that data into dashboards that IT actually approves of.
182
00:07:03,160 –> 00:07:04,600
Compare that to code interpreter
183
00:07:04,600 –> 00:07:07,160
where your only audit trail is a chat history
184
00:07:07,160 –> 00:07:09,240
and a half-trustworthy output panel.
185
00:07:09,240 –> 00:07:10,920
One looks like enterprise IT,
186
00:07:10,920 –> 00:07:12,840
the other feels like science fair.
187
00:07:12,840 –> 00:07:14,040
Here’s a practical example.
188
00:07:14,040 –> 00:07:17,560
Imagine an enterprise uploading gigabytes of sales data every day.
189
00:07:17,560 –> 00:07:19,640
A junior analyst might try running Python
190
00:07:19,640 –> 00:07:21,800
through code interpreter to clean and summarize it
191
00:07:21,800 –> 00:07:26,120
until the file limits max them in the phase at 512m by timeout.
192
00:07:26,120 –> 00:07:27,320
Failure, the same job,
193
00:07:27,320 –> 00:07:29,560
ported to an Azure function would stream chunks,
194
00:07:29,560 –> 00:07:31,000
process them concurrently,
195
00:07:31,000 –> 00:07:33,560
and finish before the analysts coffee cooled.
196
00:07:33,560 –> 00:07:35,480
The function doesn’t panic, it scales.
197
00:07:35,480 –> 00:07:37,720
So why does anyone still cling to the code interpreter?
198
00:07:37,720 –> 00:07:39,000
Because it feels easier,
199
00:07:39,000 –> 00:07:42,280
its instant feedback, zero deployment, zero friction.
200
00:07:42,280 –> 00:07:44,760
But easy and appropriate aren’t synonyms.
201
00:07:44,760 –> 00:07:46,520
Azure Functions demands discipline.
202
00:07:46,520 –> 00:07:49,000
You must define structure, handle secrets correctly,
203
00:07:49,000 –> 00:07:50,440
and manage versions.
204
00:07:50,440 –> 00:07:52,360
Yet the payoff is professional reliability,
205
00:07:52,360 –> 00:07:54,440
code that isn’t just clever but sustainable.
206
00:07:54,440 –> 00:07:57,560
In short, Azure Functions is Python without training wheels.
207
00:07:57,560 –> 00:07:59,640
It lets you integrate with APIs,
208
00:07:59,640 –> 00:08:00,760
automate at scale,
209
00:08:00,760 –> 00:08:03,480
and plug into enterprise systems responsibly.
210
00:08:03,480 –> 00:08:04,520
It’s the grown-up choice,
211
00:08:04,520 –> 00:08:06,040
not as charming as a chat box,
212
00:08:06,040 –> 00:08:07,560
but infinitely more capable.
213
00:08:07,560 –> 00:08:10,600
And yes, it solves the problem that no prompt ever will,
214
00:08:10,600 –> 00:08:13,560
consistency across every user, every environment, every run.
215
00:08:13,560 –> 00:08:16,760
So now that you’ve seen both ends of Microsoft’s Python spectrum,
216
00:08:16,760 –> 00:08:19,160
sandboxed, playpen versus industrial kitchen,
217
00:08:19,160 –> 00:08:21,640
let’s discuss the trap most teams fall into,
218
00:08:21,640 –> 00:08:23,640
confusing convenience for capability.
219
00:08:23,640 –> 00:08:26,840
The illusion of convenience,
220
00:08:26,840 –> 00:08:28,440
where most teams go wrong,
221
00:08:28,440 –> 00:08:30,200
here’s the tragedy of convenience.
222
00:08:30,200 –> 00:08:32,600
People think code interpreter means production Python.
223
00:08:32,600 –> 00:08:36,440
It doesn’t, it means please don’t bite the hand that feeds you.
224
00:08:36,440 –> 00:08:40,600
And yet every week someone drags a 400-mabbie CSV into Copilot Studio,
225
00:08:40,600 –> 00:08:43,960
hits run, and proudly declares they’ve automated data ingestion.
226
00:08:43,960 –> 00:08:46,840
Seconds later, timeout, then panic.
227
00:08:46,840 –> 00:08:48,360
Then a team’s thread titled,
228
00:08:48,360 –> 00:08:49,720
why is Python broken?
229
00:08:49,720 –> 00:08:52,040
The core misunderstanding is architectural.
230
00:08:52,040 –> 00:08:54,360
Code interpreter isn’t a data pipeline engine.
231
00:08:54,360 –> 00:08:56,760
It’s a polite sandbox pretending to be one.
232
00:08:56,760 –> 00:08:59,080
It was designed for interactive transformations,
233
00:08:59,080 –> 00:09:01,240
clean this file, summarized that data set,
234
00:09:01,240 –> 00:09:04,360
not sustained multi-step batch jobs that churn overnight,
235
00:09:04,360 –> 00:09:07,880
but many teams treated like an unlicensed copy of Azure Data Factory
236
00:09:07,880 –> 00:09:10,040
with predictably catastrophic results.
237
00:09:10,040 –> 00:09:11,240
Here’s what actually happens.
238
00:09:11,240 –> 00:09:14,680
The sandbox spins up, runs your generated Python, and dies.
239
00:09:14,680 –> 00:09:17,720
That’s it, no persistent environment, no retained context,
240
00:09:17,720 –> 00:09:18,840
no dependency management.
241
00:09:18,840 –> 00:09:20,680
You can’t pip and store your favorite package,
242
00:09:20,680 –> 00:09:22,200
you can’t allocate more RAM,
243
00:09:22,200 –> 00:09:25,240
and you definitely can’t call external APIs or databases
244
00:09:25,240 –> 00:09:27,400
unless Microsoft pre-approves the endpoint.
245
00:09:27,400 –> 00:09:29,800
In short, it’s hermetically sealed for safety,
246
00:09:29,800 –> 00:09:32,280
but users interpret safe as limitless.
247
00:09:32,280 –> 00:09:33,880
They stack logic on top of logic,
248
00:09:33,880 –> 00:09:35,400
chaining prompts, refeeding outputs
249
00:09:35,400 –> 00:09:36,920
like their debugging and notepad.
250
00:09:36,920 –> 00:09:39,800
Eventually performance plummets, sessions vanish,
251
00:09:39,800 –> 00:09:42,040
results disagree with yesterday’s run.
252
00:09:42,040 –> 00:09:45,160
Then having learned nothing, someone decides to schedule it hourly.
253
00:09:45,160 –> 00:09:47,160
Brilliant, now they’ve industrialized failure.
254
00:09:47,160 –> 00:09:48,520
The illusion is economic too.
255
00:09:48,520 –> 00:09:51,880
It feels cheaper because it hides the cost behind licensing.
256
00:09:51,880 –> 00:09:53,320
Why spin up Azure resources?
257
00:09:53,320 –> 00:09:56,200
They argue when Python runs inside Power Platform already.
258
00:09:56,200 –> 00:09:58,520
Yes, and why rent an apartment
259
00:09:58,520 –> 00:09:59,880
when you can live in a cardboard box?
260
00:09:59,880 –> 00:10:02,200
It’s technically free, right up until it rains.
261
00:10:02,200 –> 00:10:04,840
Code interpreter was never built for sustained automation.
262
00:10:04,840 –> 00:10:07,720
Its runtime is metered, ephemeral, and capped by quotas
263
00:10:07,720 –> 00:10:11,160
that exist precisely to prevent you from turning it into a data furnace.
264
00:10:11,160 –> 00:10:13,560
Meanwhile, real governance goes out the window.
265
00:10:13,560 –> 00:10:15,960
With Code interpreter, there’s minimal telemetry,
266
00:10:15,960 –> 00:10:18,280
no application insights, no centralized logging,
267
00:10:18,280 –> 00:10:20,200
no immutable audit trail.
268
00:10:20,200 –> 00:10:23,800
When something fails, you get a vague error and a shrug.
269
00:10:23,800 –> 00:10:25,720
In enterprises, that’s not automation.
270
00:10:25,720 –> 00:10:28,520
That’s an untraceable incident waiting to happen.
271
00:10:28,520 –> 00:10:30,120
Compare that to Azure functions.
272
00:10:30,120 –> 00:10:33,000
Every execution logged, every exception traceable,
273
00:10:33,000 –> 00:10:34,440
every environment version.
274
00:10:34,440 –> 00:10:37,160
IT teams prefer it not because their joyless bureaucrats
275
00:10:37,160 –> 00:10:39,800
but because accountability is non-negotiable.
276
00:10:39,800 –> 00:10:42,840
You don’t fix bugs by hoping the next prompt works better.
277
00:10:42,840 –> 00:10:46,280
You fix them by deploying tested code with continuous integration.
278
00:10:46,280 –> 00:10:47,400
And if you don’t know what that is,
279
00:10:47,400 –> 00:10:50,840
congratulations, you’ve just discovered why your flow keeps breaking.
280
00:10:50,840 –> 00:10:53,000
Still, the seduction of convenience is strong.
281
00:10:53,000 –> 00:10:55,480
Code interpreter delivers dopamine on demand,
282
00:10:55,480 –> 00:10:57,240
instant output, pretty charts,
283
00:10:57,240 –> 00:10:58,920
no infrastructure drama.
284
00:10:58,920 –> 00:11:00,600
People mistake that for maturity.
285
00:11:00,600 –> 00:11:03,480
But professional architecture isn’t about how quickly you start working.
286
00:11:03,480 –> 00:11:07,080
It’s about whether the thing still works six months later when you’re on vacation.
287
00:11:07,080 –> 00:11:10,760
Azure functions is boring precisely because it survives turnover, migration,
288
00:11:10,760 –> 00:11:11,640
and human error.
289
00:11:11,640 –> 00:11:13,880
So keep using Code interpreter for what it is.
290
00:11:13,880 –> 00:11:17,240
An interactive assistant that makes analysts feel like developers.
291
00:11:17,240 –> 00:11:19,480
But don’t ask it to run your nightly ETL,
292
00:11:19,480 –> 00:11:23,080
that’s like expecting Excel macros to manage your supply chain.
293
00:11:23,080 –> 00:11:26,200
Convenience has a place, just not the one most team stick it.
294
00:11:26,200 –> 00:11:28,920
Use it to prototype test ideas or validate logic.
295
00:11:28,920 –> 00:11:30,280
Then when it matters,
296
00:11:30,280 –> 00:11:32,040
graduate to the grown-up environment.
297
00:11:32,040 –> 00:11:36,600
Otherwise, enjoy explaining to your administrator why your quick automation
298
00:11:36,600 –> 00:11:40,920
consumed half your tenant’s compute quota, spoiler, they won’t find it funny.
299
00:11:40,920 –> 00:11:43,720
The decision framework went to use which.
300
00:11:43,720 –> 00:11:45,640
Most people don’t need another feature tour.
301
00:11:45,640 –> 00:11:46,680
They need a rulebook.
302
00:11:46,680 –> 00:11:49,160
So here it is, the sanity preserving framework
303
00:11:49,160 –> 00:11:52,280
that separates proper architecture from chatbot chaos.
304
00:11:52,280 –> 00:11:55,960
Think of this as the table your future self will print and tape above their monitor.
305
00:11:55,960 –> 00:11:58,040
Labelled when not to embarrass it.
306
00:11:58,040 –> 00:12:00,040
First rule, scope defines structure.
307
00:12:00,040 –> 00:12:04,200
Use Code interpreter when your task is immediate, local, and disposable.
308
00:12:04,200 –> 00:12:07,880
Use Azure functions when it’s recurring, global, or business critical.
309
00:12:07,880 –> 00:12:10,600
Code interpreter thrives on singular moments,
310
00:12:10,600 –> 00:12:12,440
transforming a file for a meeting,
311
00:12:12,440 –> 00:12:15,640
running a one-off analysis, producing that coveted quick win.
312
00:12:15,640 –> 00:12:18,200
Azure functions by contrast lives for repeatability,
313
00:12:18,200 –> 00:12:19,720
integration, and scale.
314
00:12:19,720 –> 00:12:21,960
If it needs versioning, monitoring,
315
00:12:21,960 –> 00:12:23,800
or an owner with a job title,
316
00:12:23,800 –> 00:12:26,200
longer than enthusiast, it belongs in Azure.
317
00:12:26,200 –> 00:12:27,720
Governance is the next divide.
318
00:12:27,720 –> 00:12:30,440
The Code interpreter exists per environment,
319
00:12:30,440 –> 00:12:33,400
tucked inside co-pilot studio’s safe boundaries.
320
00:12:33,400 –> 00:12:35,240
It’s experimental, almost personal.
321
00:12:35,240 –> 00:12:38,360
Each environment must have the feature explicitly enabled by an admin.
322
00:12:38,360 –> 00:12:40,280
Think of it as sanctioned curiosity.
323
00:12:40,280 –> 00:12:43,080
Azure functions meanwhile is codified protocol,
324
00:12:43,080 –> 00:12:45,800
centrally controlled, policy enforced, and auditable
325
00:12:45,800 –> 00:12:47,560
through Azure Monitor or Sentinel.
326
00:12:47,560 –> 00:12:50,840
If your compliance officer can spell ISO,
327
00:12:50,840 –> 00:12:52,920
you already know which side they prefer.
328
00:12:52,920 –> 00:12:54,360
Security follows naturally.
329
00:12:54,360 –> 00:12:57,240
Code interpreter protects you from yourself through sealed sandboxes.
330
00:12:57,240 –> 00:12:58,600
It can touch files you upload,
331
00:12:58,600 –> 00:13:00,680
but not the internet beyond Microsoft’s permits.
332
00:13:00,680 –> 00:13:04,120
No requests library, no browsing, no ex-filtration.
333
00:13:04,120 –> 00:13:05,960
Ideal for an analyst cleaning data,
334
00:13:05,960 –> 00:13:08,280
terrible for an integrator connecting to SAP.
335
00:13:08,280 –> 00:13:09,800
Azure functions flips that balance.
336
00:13:09,800 –> 00:13:11,640
It operates within managed identities,
337
00:13:11,640 –> 00:13:13,240
can sit inside virtual networks,
338
00:13:13,240 –> 00:13:15,080
and authenticate via OAuth.
339
00:13:15,080 –> 00:13:17,800
Secrets dwell in key vault, not inside prompts.
340
00:13:17,800 –> 00:13:21,880
So if you’re asking, can I safely call an external API or database?
341
00:13:21,880 –> 00:13:24,440
The answer is yes, just not from the interpreter.
342
00:13:24,440 –> 00:13:26,920
Scalability is where the line becomes mathematical.
343
00:13:26,920 –> 00:13:28,840
The interpreter handles one session,
344
00:13:28,840 –> 00:13:30,680
singular synchronous human paste.
345
00:13:30,680 –> 00:13:33,240
It starts when you ask and ends when the output’s done.
346
00:13:33,240 –> 00:13:36,360
Azure functions on the other hand is parallelism unleashed.
347
00:13:36,360 –> 00:13:38,520
It scales horizontally across tenants,
348
00:13:38,520 –> 00:13:40,920
bursts under load and waits politely when idle.
349
00:13:40,920 –> 00:13:43,000
If your workload could multiply,
350
00:13:43,000 –> 00:13:44,680
Azure functions will thrive.
351
00:13:44,680 –> 00:13:46,280
If it’s just you watching it run,
352
00:13:46,280 –> 00:13:47,880
code interpreter is fine.
353
00:13:47,880 –> 00:13:49,720
Maintenance costs tell another story.
354
00:13:49,720 –> 00:13:51,720
Code interpreter requires no pipelines,
355
00:13:51,720 –> 00:13:54,120
builds or dependency headaches just prompt tuning.
356
00:13:54,120 –> 00:13:57,160
But that simplicity evaporates once the logic grows.
357
00:13:57,160 –> 00:13:59,160
Prompts like true version control,
358
00:13:59,160 –> 00:14:02,440
one mistyped instruction and behavior mutates overnight.
359
00:14:02,440 –> 00:14:05,560
Azure functions anchors itself in Git or DevOps pipelines.
360
00:14:05,560 –> 00:14:08,840
Every commit, every deployment, every rollback is traceable.
361
00:14:08,840 –> 00:14:11,000
Bugs are documented since, not mysteries.
362
00:14:11,000 –> 00:14:13,000
So when colleagues demand run the version
363
00:14:13,000 –> 00:14:15,160
we use last quarter, functions actually can.
364
00:14:15,160 –> 00:14:16,920
Now let’s translate this into human roles.
365
00:14:16,920 –> 00:14:18,120
Picture two professionals,
366
00:14:18,120 –> 00:14:19,880
the analyst and the architect.
367
00:14:19,880 –> 00:14:22,200
The analyst lives in power, bi and Excel,
368
00:14:22,200 –> 00:14:25,240
obsessed with data transformations and visualization.
369
00:14:25,240 –> 00:14:27,000
Their job ends when inside appears.
370
00:14:27,000 –> 00:14:29,240
For them, code interpreter is ideal.
371
00:14:29,240 –> 00:14:31,880
Generate Python snippets that summarize CSVs,
372
00:14:31,880 –> 00:14:35,000
produce visuals and send quick outputs in Copilot Studio.
373
00:14:35,000 –> 00:14:36,760
Temporary, contained, effective.
374
00:14:36,760 –> 00:14:39,880
The architect however designs systems
375
00:14:39,880 –> 00:14:42,520
that must not explode when touched by power users.
376
00:14:42,520 –> 00:14:44,600
They think in tenant boundaries not CSVs.
377
00:14:44,600 –> 00:14:46,120
Their world involves pipelines,
378
00:14:46,120 –> 00:14:49,880
authentication flows and dependencies between half the company’s services.
379
00:14:49,880 –> 00:14:51,960
For them, Azure functions is the obvious choice.
380
00:14:51,960 –> 00:14:53,400
They need predictable scaling,
381
00:14:53,400 –> 00:14:55,640
deployment pipelines and security compliance.
382
00:14:55,640 –> 00:14:58,760
The same code that the analyst tested casually in Copilot,
383
00:14:58,760 –> 00:15:00,840
the architect turns into a production API.
384
00:15:00,840 –> 00:15:02,840
That leads to my favorite hybrid pattern,
385
00:15:02,840 –> 00:15:04,840
the prototype to production loop.
386
00:15:04,840 –> 00:15:06,280
Start ideas in code interpreter.
387
00:15:06,280 –> 00:15:09,640
It’s fast, no approval delays, no environment builds,
388
00:15:09,640 –> 00:15:11,240
just immediate feedback.
389
00:15:11,240 –> 00:15:14,120
Once the experiment stabilizes, say a data transformation prompt
390
00:15:14,120 –> 00:15:17,080
that consistently outputs the right schema, graduated.
391
00:15:17,080 –> 00:15:19,320
Take the generated Python, refine it,
392
00:15:19,320 –> 00:15:21,000
push it to an Azure function
393
00:15:21,000 –> 00:15:24,120
with proper error handling, environment variables and CI/CD.
394
00:15:24,120 –> 00:15:27,320
Congratulations, you’ve used both environments exactly as intended.
395
00:15:27,320 –> 00:15:29,320
The elegance of this pattern is it respects
396
00:15:29,320 –> 00:15:31,400
scale and governance simultaneously.
397
00:15:31,400 –> 00:15:33,960
Code interpreter encourages innovation.
398
00:15:33,960 –> 00:15:36,120
Azure functions systematizes it.
399
00:15:36,120 –> 00:15:39,000
One lowers the barrier, the other raises the standard.
400
00:15:39,000 –> 00:15:40,680
Skipping either makes you inefficient,
401
00:15:40,680 –> 00:15:43,880
staying forever in the prompt renders your project unmanageable.
402
00:15:43,880 –> 00:15:47,000
Forcing every minor script into Azure’s mother’s agility.
403
00:15:47,000 –> 00:15:49,080
The trick is knowing when tinkering ends
404
00:15:49,080 –> 00:15:51,480
and engineering begins to summarize,
405
00:15:51,480 –> 00:15:53,160
though I hesitate to spoon feed.
406
00:15:53,160 –> 00:15:54,280
Code interpreter,
407
00:15:54,280 –> 00:15:56,520
exhaust disposable, interactive,
408
00:15:56,520 –> 00:15:57,880
governed by sandbox.
409
00:15:57,880 –> 00:16:00,280
Azure functions its persistent, reusable,
410
00:16:00,280 –> 00:16:01,880
governed by architecture.
411
00:16:01,880 –> 00:16:05,480
The arrogance of scale meets the humility of governance right here.
412
00:16:05,480 –> 00:16:07,320
Innovation demands the freedom to try,
413
00:16:07,320 –> 00:16:10,520
enterprise survival demands the discipline to systematize.
414
00:16:10,520 –> 00:16:13,320
Use the sandbox to think, the function to deliver,
415
00:16:13,320 –> 00:16:16,840
and stop pretending one tool can be both kitchen and microwave.
416
00:16:16,840 –> 00:16:19,800
If you follow that matrix, you won’t just build faster.
417
00:16:19,800 –> 00:16:21,560
You’ll finally build responsibly.
418
00:16:21,560 –> 00:16:24,280
The enterprise reality check.
419
00:16:24,280 –> 00:16:26,360
Governance, cost and control.
420
00:16:26,360 –> 00:16:28,760
Let’s talk about the part everyone claims to understand
421
00:16:28,760 –> 00:16:30,040
but rarely enforces.
422
00:16:30,040 –> 00:16:31,320
Governance.
423
00:16:31,320 –> 00:16:32,920
When you bring Python into an enterprise,
424
00:16:32,920 –> 00:16:35,400
you don’t just inherit power, you inherit accountability.
425
00:16:35,400 –> 00:16:37,160
Power platforms, code interpreter,
426
00:16:37,160 –> 00:16:39,560
gives users automation superpowers,
427
00:16:39,560 –> 00:16:42,200
but it also gives compliance officers night sweats.
428
00:16:42,200 –> 00:16:43,640
That sandbox may look sealed,
429
00:16:43,640 –> 00:16:47,240
but every execution is still a code run inside corporate infrastructure.
430
00:16:47,240 –> 00:16:49,640
And with code comes risk, start with quotas.
431
00:16:49,640 –> 00:16:52,120
Microsoft didn’t design limits just to be annoying.
432
00:16:52,120 –> 00:16:54,280
They exist to keep you from bankrupting your tenant.
433
00:16:54,280 –> 00:16:58,200
Each power platform environment caps file sizes at 512 bun,
434
00:16:58,200 –> 00:16:59,560
restricts sessions,
435
00:16:59,560 –> 00:17:01,800
and throttles daily power platform requests.
436
00:17:01,800 –> 00:17:05,000
Teams subscriptions get as few as 6000 per day.
437
00:17:05,000 –> 00:17:07,640
Enterprise plans stretch higher but are still finite.
438
00:17:07,640 –> 00:17:09,080
Once a flow crosses that line,
439
00:17:09,080 –> 00:17:11,880
it fails silently or stalls until midnight.
440
00:17:11,880 –> 00:17:14,360
As your functions meanwhile couldn’t care less about quotas,
441
00:17:14,360 –> 00:17:15,800
it scales with your wallet.
442
00:17:15,800 –> 00:17:17,880
You pay by execution time and memory,
443
00:17:17,880 –> 00:17:19,720
but you define your thresholds,
444
00:17:19,720 –> 00:17:22,120
predictable spending replaces hidden throttles.
445
00:17:22,120 –> 00:17:23,720
Then there’s the security posture.
446
00:17:23,720 –> 00:17:27,560
Code interpreter lives under the benevolent dictatorship of Microsoft’s sandbox.
447
00:17:27,560 –> 00:17:29,320
It can’t call external APIs,
448
00:17:29,320 –> 00:17:30,600
can’t reach internet addresses
449
00:17:30,600 –> 00:17:32,600
and can’t install malicious packages.
450
00:17:32,600 –> 00:17:35,560
That’s good until your business process actually requires those things.
451
00:17:35,560 –> 00:17:38,680
One enthusiastic analyst decides to extend functionality
452
00:17:38,680 –> 00:17:43,000
with a custom prompt that passes financial data from an external endpoint
453
00:17:43,000 –> 00:17:45,480
and suddenly governance alarms start shrieking.
454
00:17:45,480 –> 00:17:49,320
The sandbox intentionally forbids outbound connections to prevent data leakage.
455
00:17:49,320 –> 00:17:50,760
Every execution is logged yes,
456
00:17:50,760 –> 00:17:52,440
but only within that environment.
457
00:17:52,440 –> 00:17:56,040
There’s no cross-tenant telemetry or SOT-friendly logging pipeline.
458
00:17:56,040 –> 00:17:59,320
Azure functions answers that limitation with luxuriant paranoia.
459
00:17:59,320 –> 00:18:01,960
It authenticates through managed identities
460
00:18:01,960 –> 00:18:06,440
and crypts everything in transit and can sit inside isolated virtual networks.
461
00:18:06,440 –> 00:18:07,720
Want to trace every call?
462
00:18:07,720 –> 00:18:11,560
Application insights documents them all with timestamps and payload metadata.
463
00:18:11,560 –> 00:18:15,560
IT departments sleep better knowing each request leaves a forensic footprint.
464
00:18:15,560 –> 00:18:17,640
Cost is another misunderstood dimension.
465
00:18:17,640 –> 00:18:21,720
Makeers often say code interpreter is free because it’s included.
466
00:18:21,720 –> 00:18:24,760
Incorrect, it’s prepaid under licensing big difference.
467
00:18:24,760 –> 00:18:27,080
Each prompt consumes compute, storage,
468
00:18:27,080 –> 00:18:31,080
and network resources that contribute to your tenant’s power platform capacity.
469
00:18:31,080 –> 00:18:34,760
Once demand spikes, administrators either pay for more capacity
470
00:18:34,760 –> 00:18:37,400
or start banning over enthusiastic creators.
471
00:18:37,400 –> 00:18:41,240
Azure functions conversely builds per execution and scales linearly.
472
00:18:41,240 –> 00:18:44,280
You use it, you pay for it, you stop the meter pauses.
473
00:18:44,280 –> 00:18:48,440
For structured workloads, think nightly ETL or batch reports this model wins.
474
00:18:48,440 –> 00:18:51,160
It converts chaos budgeting into predictable precision.
475
00:18:51,160 –> 00:18:53,080
Governance hierarchy completes the picture.
476
00:18:53,080 –> 00:18:56,600
Code interpreter is controlled through the power platform admin center
477
00:18:56,600 –> 00:18:57,960
toggled by environment.
478
00:18:57,960 –> 00:18:59,480
Its policy domain ends there.
479
00:18:59,480 –> 00:19:03,160
Azure functions operates under Azure policy and role-based access control.
480
00:19:03,160 –> 00:19:06,840
That means you can restrict deployment by role and force tagging standards,
481
00:19:06,840 –> 00:19:09,960
demand encryption at rest, and audit configuration drift.
482
00:19:09,960 –> 00:19:12,360
When security teams perform internal reviews,
483
00:19:12,360 –> 00:19:15,320
functions survive scrutiny, chat prompts not so much.
484
00:19:15,320 –> 00:19:18,280
Picture a typical scenario.
485
00:19:18,280 –> 00:19:22,040
An internal audit discovers multiple co-pilot prompts executing financial
486
00:19:22,040 –> 00:19:24,600
data transformations with no centralized approval.
487
00:19:24,600 –> 00:19:26,680
The auditors trace logs half are missing.
488
00:19:26,680 –> 00:19:30,280
The admin panics and disables code execution across environments overnight.
489
00:19:30,280 –> 00:19:31,480
Everything stops working.
490
00:19:31,480 –> 00:19:35,960
Q frantic teams messages from analysts who build half their reporting stack in prompts.
491
00:19:35,960 –> 00:19:38,360
Compare that with the Azure functions approach.
492
00:19:38,360 –> 00:19:41,720
Code repositories, version releases, and monitoring dashboards.
493
00:19:41,720 –> 00:19:46,440
The same auditors request evidence and IT produces a neat pipeline diagram,
494
00:19:46,440 –> 00:19:49,160
execution logs, and policy compliance reports.
495
00:19:49,160 –> 00:19:52,360
One side looks experimental, the other, institutional.
496
00:19:52,360 –> 00:19:54,440
The moral isn’t to abandon code interpreter.
497
00:19:54,440 –> 00:19:56,040
It’s to understand its border.
498
00:19:56,040 –> 00:19:59,720
It’s perfect for ideation and testing, but when real money, compliance,
499
00:19:59,720 –> 00:20:02,200
or customer data touch the code, you promote it.
500
00:20:02,200 –> 00:20:04,040
Hybrid best practice.
501
00:20:04,040 –> 00:20:06,600
Prototype in the sandbox, deploy in Azure.
502
00:20:06,600 –> 00:20:09,320
That pattern satisfies both creativity and control.
503
00:20:09,320 –> 00:20:12,120
A spark in co-pilot becomes an approved microservice with provenance,
504
00:20:12,120 –> 00:20:13,720
telemetry, and a life cycle.
505
00:20:13,720 –> 00:20:16,280
Because power without structure isn’t innovation,
506
00:20:16,280 –> 00:20:19,720
it’s entropy and enterprises have enough of that already.
507
00:20:19,720 –> 00:20:20,760
Stop the misuse.
508
00:20:20,760 –> 00:20:22,600
So here’s the line in the silicon.
509
00:20:22,600 –> 00:20:25,000
Code interpreter is a phenomenal sandbox.
510
00:20:25,000 –> 00:20:28,040
A safe place for experimentation, small automations,
511
00:20:28,040 –> 00:20:30,760
and quick insights inside co-pilot studio.
512
00:20:30,760 –> 00:20:33,160
It democratizes Python without dismantling compliance,
513
00:20:33,160 –> 00:20:36,200
but it’s not under any interpretation a production platform.
514
00:20:36,200 –> 00:20:38,840
Azure functions on the other hand is your Python backbone,
515
00:20:38,840 –> 00:20:41,480
governed, auditable, and ruthlessly scalable.
516
00:20:41,480 –> 00:20:43,560
Using the wrong one isn’t just inefficient.
517
00:20:43,560 –> 00:20:46,760
It insults the architecture your organization pays to maintain.
518
00:20:46,760 –> 00:20:51,160
Running batch pipelines in a conversational agent is like towing a trailer with a bicycle.
519
00:20:51,160 –> 00:20:53,560
It moves technically, but only until the axle snaps.
520
00:20:53,560 –> 00:20:56,680
Enterprise reliability comes from separation of intent.
521
00:20:56,680 –> 00:21:00,120
Prototype where it’s cheap, deploy, where it’s controlled.
522
00:21:00,120 –> 00:21:02,840
So stop feeding heavy workloads into code interpreter
523
00:21:02,840 –> 00:21:04,360
and calling it automation.
524
00:21:04,360 –> 00:21:07,000
Start using Azure functions for what it was built to do.
525
00:21:07,000 –> 00:21:11,080
Secure, versioned, repeatable logic that survives you going on holiday.
526
00:21:11,080 –> 00:21:13,560
Your admins will thank you, your audit logs will thank you,
527
00:21:13,560 –> 00:21:16,120
and remarkably your code will still work next quarter.
528
00:21:16,120 –> 00:21:18,680
If this saved you time or rescued your sanity,
529
00:21:18,680 –> 00:21:20,600
repay the debt, subscribe,
530
00:21:20,600 –> 00:21:22,680
tap follow, enable notifications,
531
00:21:22,680 –> 00:21:25,480
and let the next update arrive like a scheduled task.
532
00:21:25,480 –> 00:21:27,720
on time 0 drama. Do the efficient thing now.






