การรักษาความปลอดภัยบน Azure สำหรับนักพัฒนา
Anushika Agarwal
Cloud Data Engineer
ขนของชำด้วยการเดินทางหลายเที่ยวที่เล็กลง
เบากว่า เร็วกว่า และปลอดภัยกว่า



/v1.0/users : (default) คืนค่า 100 รายการ ต่อหน้า

Query Parameters
$top: จำนวนรายการต่อหน้า
$skip: offset; เริ่มหลังจาก N รายการแรก

https://graph.microsoft.com/v1.0/groups?$top=2

payload เดียว -> response เดียวพร้อมผลลัพธ์ทั้งหมด
ประโยชน์
ข้อจำกัด

Endpoint
https://graph.microsoft.com/v1.0/$batchใช้ $batch แทน resource เฉพาะเจาะจง เช่น users

requestsrequests เป็นarray (สูงสุด 20 รายการ){ "requests":
[ {
"id": "1",
"method": "GET",
"url": "/me/memberOf"
},
{
"id": "2",
"method": "GET",
"url": "/me/planner/tasks"
} ]
}
แต่ละ request item ต้องมี
id: label ที่ไม่ซ้ำกัน สำหรับจับคู่กับ responsemethod: (GET/POST/PATCH/DELETE)url: relative pathHeaders: Content-Type: application/json
{ "requests":
[ {
"id": "1",
"method": "GET",
"url": "/me/memberOf"
},
{
"id": "2",
"method": "GET",
"url": "/me/planner/tasks"
} ]
}
{
"responses": [
{ "id": "1",
"status": 200,
"body": { "value": [/* ... */]}},
{
"id": "2",
"status": 403,
"body": { "error": [/* ... */]}}
]
}
แต่ละ response item ประกอบด้วย
id: ตรงกับ request เดิม
status: HTTP status ของรายการนั้น
200: OK403: Forbiddenheaders: (เช่น Content-Type)
body: ข้อมูลหรือ error object
{
"responses": [
{ "id": "1",
"status": 200,
"body": { "value": [/* ... */]}},
{
"id": "2",
"status": 403,
"body": { "error": [/* ... */]}}
]
}
การรักษาความปลอดภัยบน Azure สำหรับนักพัฒนา