Microsoft Graph扩展的大小与数量限制咨询
Microsoft Graph Open Extensions: Size & Quantity Limits
Hey there! Let me walk you through the key limits you need to know when using openExtension to store user (or other resource) additional data in Microsoft Graph:
Size Limits per Extension
- Each individual
openExtension(including all its property names and their values) has a maximum total size of 256 KB. - Keep in mind: This size counts every byte of the extension's content—including property names, string values (accounting for UTF-8 encoding, where some characters take 2-4 bytes), and any nested JSON structures you might use. So if you're storing long text or complex objects, you'll need to keep an eye on the total byte count.
Quantity Limits per Resource
- For most resources (like users, groups, events, contacts), you can attach up to 100
openExtensioninstances to a single resource instance. - A critical exception: For email message (
message) resources, you're limited to only 2openExtensioninstances per message. This is a gotcha that trips up a lot of folks, so make sure to note it if you're working with messages.
Quick Bonus Tip
If you need to store larger datasets or require structured, schema-enforced data, consider using schemaExtension instead. It has different limits (higher total size per resource, fewer extensions allowed per resource) but might fit your use case better if openExtension's constraints are too tight.
内容的提问来源于stack exchange,提问作者Dmitry Tabakerov
相关产品推荐
相关产品推荐

