Module 3 · Files, tools and your own data Lesson 10 of 15
The Copilot and Azure OpenAI APIs and your first script
Microsoft offers Copilot extensibility through its own platform tools, and the underlying models through Azure OpenAI for building your own application. You do not need this to finish the course, and you do not need it for a fresher job either — but an afternoon here is what turns "I have used Microsoft Copilot" into "I have built with it", which is a different sentence in an interview.
The concept
Microsoft offers Copilot extensibility through its own platform tools, and the underlying models through Azure OpenAI for building your own application. The idea is simple: the same model you have been chatting with also answers a web request, so you can put it inside a script, a spreadsheet or a page. A key identifies you; a request sends the text; a response comes back as data.
The reason to try it once, even if you never build anything: it makes the chat version less mysterious. You see that the whole conversation is text in and text out, that your instructions are literally lines of a request, and that "the model" is one parameter among several.
A first call looks like this:
from openai import AzureOpenAI
client = AzureOpenAI(
api_version="2024-10-21",
azure_endpoint="https://YOUR-RESOURCE.openai.azure.com/",
)
r = client.chat.completions.create(
model="gpt-4o-mini",
messages=[{"role": "user", "content": "Name three uses of AI in a support desk."}],
)
print(r.choices[0].message.content)Common mistakes
The mistake is building a demo with credentials from a work tenant. Your trial keys belong to your own sandbox resource, not to the company's production one.
Worked example
A small Azure OpenAI call that classifies support emails by topic is the standard first exercise, and it is the same request shape you will meet in any job that builds on Microsoft's stack.
Your practice task
Get a key, run one request that works, and change one word in it to see the answer change. That is the whole of the first afternoon.
Do this before moving on. Reading a solution teaches the shape of it; typing it teaches you.
Key takeaway
Microsoft offers Copilot extensibility through its own platform tools, and the underlying models through Azure OpenAI for building your own application.
Keep your place in this course
A free account saves which lessons you have finished and unlocks the certificate. The lesson itself stays free to read.
Create free account or sign inCourse complete
You finished every lesson.
Your certificate is ready, and the projects you built are the proof to attach to an application.
Almost there
15 lessons left of 15
Finish every lesson to unlock the certificate. Each one ends in a practice task — do them and the final project brief writes itself.