extensionRibbonsArray object
The extensions.ribbons
property provides the ability to add add-in commands (buttons and menu items) to the Microsoft 365 application's ribbon. The ribbon definition is selected from the array based on the requirements and first-of order.
Properties that reference this object type:
Syntax
{
"requirements": {
"capabilities": [
{
capabilities object
}
],
"scopes": [
"mail | workbook | document | presentation"
],
"formFactors": [
"desktop | mobile"
]
},
"contexts": [
"mailRead | mailCompose | meetingDetailsOrganizer | meetingDetailsAttendee | onlineMeetingDetailsOrganizer | logEventMeetingDetailsAttendee | default | spamReportingOverride"
],
"tabs": [
{
"id": "{string}",
"label": "{string}",
"position": {
position object
},
"builtInTabId": "{string}",
"groups": [
{
extensionRibbonsCustomTabGroupsItem object
}
],
"customMobileRibbonGroups": [
{
extensionRibbonsCustomMobileGroupItem object
}
]
}
],
"fixedControls": [
{
"id": "{string}",
"type": "button",
"label": "{string}",
"icons": [
{
extensionCommonIcon object
}
],
"supertip": {
extensionCommonSuperToolTip object
},
"actionId": "{string}",
"enabled": {boolean}
}
],
"spamPreProcessingDialog": {
"title": "{string}",
"description": "{string}",
"spamReportingOptions": {
spamReportingOptions object
},
"spamFreeTextSectionTitle": "{string}",
"spamMoreInfo": {
spamMoreInfo object
}
}
}
{
"requirements": {
"capabilities": [
{
capabilities object
}
],
"scopes": [
"mail | workbook | document | presentation"
],
"formFactors": [
"desktop | mobile"
]
},
"contexts": [
"mailRead | mailCompose | meetingDetailsOrganizer | meetingDetailsAttendee | onlineMeetingDetailsOrganizer | logEventMeetingDetailsAttendee | default"
],
"tabs": [
{
"id": "{string}",
"label": "{string}",
"position": {
position object
},
"builtInTabId": "{string}",
"groups": [
{
extensionRibbonsCustomTabGroupsItem object
}
],
"customMobileRibbonGroups": [
{
extensionRibbonsCustomMobileGroupItem object
}
]
}
]
}
Properties
requirements
Specifies the scopes, formFactors, and Office JavaScript library requirement sets that must be supported on the Office client in order for the ribbon customization to appear. For more information, see Specify Office Add-in requirements in the unified manifest for Microsoft 365.
Required
—
Constraints
Supported values
contexts
Specifies the Microsoft 365 application window in which the ribbon customization is available to the user. Each item in the array is a member of a string array.
Type
Array of string
Required
—
Constraints
Minimum array items: 1. Maximum array items: 8.
Supported values
Allowed values: mailRead
, mailCompose
, meetingDetailsOrganizer
, meetingDetailsAttendee
, onlineMeetingDetailsOrganizer
, logEventMeetingDetailsAttendee
, default
, spamReportingOverride
.
contexts
Specifies the Microsoft 365 application window in which the ribbon customization is available to the user. Each item in the array is a member of a string array.
Type
Array of string
Required
—
Constraints
Minimum array items: 1. Maximum array items: 7.
Supported values
Allowed values: mailRead
, mailCompose
, meetingDetailsOrganizer
, meetingDetailsAttendee
, onlineMeetingDetailsOrganizer
, logEventMeetingDetailsAttendee
, default
.
tabs
Configures the custom tabs on the Microsoft 365 application ribbon.
Type
Array of extensionRibbonsArrayTabsItem
Required
✅
Constraints
Maximum array items: 20.
Supported values
fixedControls
Configures the button of an integrated spam-reporting add-in in Outlook. Must configure if spamReportingOverride
is specified in the extensions.ribbons.contexts
array.
Type
Array of extensionRibbonsArrayFixedControlItem
Required
—
Constraints
Supported values
spamPreProcessingDialog
Configures the preprocessing dialog of an integrated spam-reporting add-in in Outlook.
Required
—
Constraints
Supported values
Remarks
To use extensions.ribbons
, see create add-in commands, configure the UI for the task pane command, and configure the UI for the function command.
Examples
{
"extensions": [
{
"ribbons": [
{
"contexts": [
"mailCompose"
],
"tabs": [
{
"builtInTabId": "TabDefault",
"groups": [
{
"id": "dashboard",
"label": "Controls",
"controls": [
{
"id": "control1",
"type": "button",
"label": "Action 1",
"icons": [
{
"size": 16,
"url": "test_16.png"
},
{
"size": 32,
"url": "test_32.png"
},
{
"size": 80,
"url": "test_80.png"
}
],
"supertip": {
"title": "Action 1 Title",
"description": "Action 1 Description"
},
"actionId": "action1"
},
{
"id": "menu1",
"type": "menu",
"label": "My Menu",
"icons": [
{
"size": 16,
"url": "test_16.png"
},
{
"size": 32,
"url": "test_32.png"
},
{
"size": 80,
"url": "test_80.png"
}
],
"supertip": {
"title": "My Menu",
"description": "Menu with 2 actions"
},
"items": [
{
"id": "menuItem1",
"type": "menuItem",
"label": "Action 2",
"supertip": {
"title": "Action 2 Title",
"description": "Action 2 Description"
},
"actionId": "action2"
},
{
"id": "menuItem2",
"type": "menuItem",
"label": "Action 3",
"icons": [
{
"size": 16,
"url": "test_16.png"
},
{
"size": 32,
"url": "test_32.png"
},
{
"size": 80,
"url": "test_80.png"
}
],
"supertip": {
"title": "Action 3 Title",
"description": "Action 3 Description"
},
"actionId": "action3"
}
]
}
]
}
],
}
]
},
{
"contexts": [ "mailRead" ],
"tabs": [
{
"builtInTabId": "TabDefault",
"groups": [
{
"id": "dashboard",
"label": "Controls",
"controls": [
{
"id": "control1",
"type": "button",
"label": "Action 1",
"icons": [
{
"size": 16,
"url": "test_16.png"
},
{
"size": 32,
"url": "test_32.png"
},
{
"size": 80,
"url": "test_80.png"
}
],
"supertip": {
"title": "Action 1 Title",
"description": "Action 1 Description"
},
"actionId": "action1"
}
]
}
],
"customMobileRibbonGroups" [
{
"id": "myMobileGroup",
"label": "Contoso Actions",
"controls": [
{
"id": "msgReadFunctionButton",
"type": "mobileButton",
"label": "Action 1",
"icons": [
{
"size": 16,
"url": "test_16.png"
},
{
"size": 32,
"url": "test_32.png"
},
{
"size": 80,
"url": "test_80.png"
}
],
"supertip": {
"title": "Action 1 Title",
"description": "Action 1 Description"
},
"actionId": "action1"
}
]
}
]
"customMobileRibbonGroups": [
{
"id": "mobileDashboard",
"label": "Controls",
"controls": [
{
"id": "control1",
"type": "mobileButton",
"label": "Action 1",
"icons": [
{
"size": 16,
"url": "test_16.png"
},
{
"size": 32,
"url": "test_32.png"
},
{
"size": 80,
"url": "test_80.png"
}
],
"supertip": {
"title": "Action 1 Title",
"description": "Action 1 Description"
},
"actionId": "action1"
}
]
}
]
}
]
}
]
}
]
}