@softeria/ms-365-mcp-server 0.84.0 → 0.85.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/endpoints.json +7 -0
- package/dist/generated/client.js +64 -45
- package/dist/lib/microsoft-auth.js +17 -7
- package/dist/server.js +14 -2
- package/package.json +1 -1
- package/src/endpoints.json +7 -0
package/dist/endpoints.json
CHANGED
|
@@ -1540,5 +1540,12 @@
|
|
|
1540
1540
|
"toolName": "remove-group-owner",
|
|
1541
1541
|
"workScopes": ["Group.ReadWrite.All"],
|
|
1542
1542
|
"llmTip": "Removes an owner from a group. A group must have at least one owner — this call fails if you try to remove the last owner. Use list-group-owners to find the owner's ID."
|
|
1543
|
+
},
|
|
1544
|
+
{
|
|
1545
|
+
"pathPattern": "/chats",
|
|
1546
|
+
"method": "post",
|
|
1547
|
+
"toolName": "create-chat",
|
|
1548
|
+
"workScopes": ["Chat.Create", "Chat.ReadWrite"],
|
|
1549
|
+
"llmTip": "Creates a new 1:1 or group Teams chat. Body: { chatType ('oneOnOne' or 'group'), topic (optional, group only), members: [{ '@odata.type': '#microsoft.graph.aadUserConversationMember', roles: ['owner' | 'guest'], 'user@odata.bind': 'https://graph.microsoft.com/v1.0/users({id})' }] }. A oneOnOne chat requires exactly 2 members (self + other), both with role 'owner'. For group chats, include all participants. The signed-in user must be one of the members. Returns the created chat with its id — use that id with send-chat-message, list-chat-members, etc."
|
|
1543
1550
|
}
|
|
1544
1551
|
]
|
package/dist/generated/client.js
CHANGED
|
@@ -567,10 +567,10 @@ const microsoft_graph_user = z.object({
|
|
|
567
567
|
createdDateTime: z.string().regex(
|
|
568
568
|
/^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$/
|
|
569
569
|
).datetime({ offset: true }).describe(
|
|
570
|
-
"The date and time the user was created, in ISO 8601 format and UTC. The value can't be modified and is automatically populated when the entity is created. Nullable. For on-premises users, the value represents when they were first created in Microsoft Entra ID. Property is null for some users created before June 2018 and on-premises users that were synced to Microsoft Entra ID before June 2018. Read-only.
|
|
570
|
+
"The date and time the user was created, in ISO 8601 format and UTC. The value can't be modified and is automatically populated when the entity is created. Nullable. For on-premises users, the value represents when they were first created in Microsoft Entra ID. Property is null for some users created before June 2018 and on-premises users that were synced to Microsoft Entra ID before June 2018. Read-only. Requires $select to retrieve. Supports $filter (eq, ne, not , ge, le, in)."
|
|
571
571
|
).nullish(),
|
|
572
572
|
state: z.string().describe(
|
|
573
|
-
"The state or province in the user's address. Maximum length is 128 characters.
|
|
573
|
+
"The state or province in the user's address. Maximum length is 128 characters. Requires $select to retrieve. Supports $filter (eq, ne, not, ge, le, in, startsWith, and eq on null values)."
|
|
574
574
|
).nullish(),
|
|
575
575
|
userPrincipalName: z.string().describe(
|
|
576
576
|
"The user principal name (UPN) of the user. The UPN is an Internet-style sign-in name for the user based on the Internet standard RFC 822. By convention, this value should map to the user's email name. The general format is alias@domain, where the domain must be present in the tenant's collection of verified domains. This property is required when a user is created. The verified domains for the tenant can be accessed from the verifiedDomains property of organization.NOTE: This property can't contain accent characters. Only the following characters are allowed A - Z, a - z, 0 - 9, ' . - _ ! # ^ ~. For the complete list of allowed characters, see username policies. Returned by default. Supports $filter (eq, ne, not, ge, le, in, startsWith, endsWith) and $orderby."
|
|
@@ -581,47 +581,47 @@ const microsoft_graph_user = z.object({
|
|
|
581
581
|
"Date and time when this object was deleted. Always null when the object hasn't been deleted."
|
|
582
582
|
).nullish(),
|
|
583
583
|
aboutMe: z.string().describe(
|
|
584
|
-
"A freeform text entry field for the user to describe themselves.
|
|
584
|
+
"A freeform text entry field for the user to describe themselves. Requires $select to retrieve."
|
|
585
585
|
).nullish(),
|
|
586
586
|
accountEnabled: z.boolean().describe(
|
|
587
|
-
"true if the account is enabled; otherwise, false. This property is required when a user is created.
|
|
587
|
+
"true if the account is enabled; otherwise, false. This property is required when a user is created. Requires $select to retrieve. Supports $filter (eq, ne, not, and in)."
|
|
588
588
|
).nullish(),
|
|
589
589
|
ageGroup: z.string().describe(
|
|
590
|
-
"Sets the age group of the user. Allowed values: null, Minor, NotAdult, and Adult. For more information, see legal age group property definitions.
|
|
590
|
+
"Sets the age group of the user. Allowed values: null, Minor, NotAdult, and Adult. For more information, see legal age group property definitions. Requires $select to retrieve. Supports $filter (eq, ne, not, and in)."
|
|
591
591
|
).nullish(),
|
|
592
592
|
assignedLicenses: z.array(microsoft_graph_assignedLicense).describe(
|
|
593
|
-
"The licenses that are assigned to the user, including inherited (group-based) licenses. This property doesn't differentiate between directly assigned and inherited licenses. Use the licenseAssignmentStates property to identify the directly assigned and inherited licenses. Not nullable.
|
|
593
|
+
"The licenses that are assigned to the user, including inherited (group-based) licenses. This property doesn't differentiate between directly assigned and inherited licenses. Use the licenseAssignmentStates property to identify the directly assigned and inherited licenses. Not nullable. Requires $select to retrieve. Supports $filter (eq, not, /$count eq 0, /$count ne 0)."
|
|
594
594
|
).optional(),
|
|
595
595
|
assignedPlans: z.array(microsoft_graph_assignedPlan).describe(
|
|
596
|
-
"The plans that are assigned to the user. Read-only. Not nullable.
|
|
596
|
+
"The plans that are assigned to the user. Read-only. Not nullable. Requires $select to retrieve. Supports $filter (eq and not)."
|
|
597
597
|
).optional(),
|
|
598
598
|
authorizationInfo: microsoft_graph_authorizationInfo.optional(),
|
|
599
599
|
birthday: z.string().regex(
|
|
600
600
|
/^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$/
|
|
601
601
|
).datetime({ offset: true }).describe(
|
|
602
|
-
"The birthday of the user. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC. For example, midnight UTC on Jan 1, 2014, is 2014-01-01T00:00:00Z.
|
|
602
|
+
"The birthday of the user. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC. For example, midnight UTC on Jan 1, 2014, is 2014-01-01T00:00:00Z. Requires $select to retrieve."
|
|
603
603
|
).optional(),
|
|
604
604
|
businessPhones: z.array(z.string()).describe(
|
|
605
605
|
"The telephone numbers for the user. NOTE: Although it's a string collection, only one number can be set for this property. Read-only for users synced from the on-premises directory. Returned by default. Supports $filter (eq, not, ge, le, startsWith)."
|
|
606
606
|
).optional(),
|
|
607
607
|
city: z.string().describe(
|
|
608
|
-
"The city where the user is located. Maximum length is 128 characters.
|
|
608
|
+
"The city where the user is located. Maximum length is 128 characters. Requires $select to retrieve. Supports $filter (eq, ne, not, ge, le, in, startsWith, and eq on null values)."
|
|
609
609
|
).nullish(),
|
|
610
610
|
companyName: z.string().describe(
|
|
611
|
-
"The name of the company that the user is associated with. This property can be useful for describing the company that a guest comes from. The maximum length is 64 characters.
|
|
611
|
+
"The name of the company that the user is associated with. This property can be useful for describing the company that a guest comes from. The maximum length is 64 characters.Requires $select to retrieve. Supports $filter (eq, ne, not, ge, le, in, startsWith, and eq on null values)."
|
|
612
612
|
).nullish(),
|
|
613
613
|
consentProvidedForMinor: z.string().describe(
|
|
614
|
-
"Sets whether consent was obtained for minors. Allowed values: null, Granted, Denied, and NotRequired. For more information, see legal age group property definitions.
|
|
614
|
+
"Sets whether consent was obtained for minors. Allowed values: null, Granted, Denied, and NotRequired. For more information, see legal age group property definitions. Requires $select to retrieve. Supports $filter (eq, ne, not, and in)."
|
|
615
615
|
).nullish(),
|
|
616
616
|
country: z.string().describe(
|
|
617
|
-
"The country or region where the user is located; for example, US or UK. Maximum length is 128 characters.
|
|
617
|
+
"The country or region where the user is located; for example, US or UK. Maximum length is 128 characters. Requires $select to retrieve. Supports $filter (eq, ne, not, ge, le, in, startsWith, and eq on null values)."
|
|
618
618
|
).nullish(),
|
|
619
619
|
creationType: z.string().describe(
|
|
620
|
-
"Indicates whether the user account was created through one of the following methods: As a regular school or work account (null). As an external account (Invitation). As a local account for an Azure Active Directory B2C tenant (LocalAccount). Through self-service sign-up by an internal user using email verification (EmailVerified). Through self-service sign-up by a guest signing up through a link that is part of a user flow (SelfServiceSignUp). Read-only.
|
|
620
|
+
"Indicates whether the user account was created through one of the following methods: As a regular school or work account (null). As an external account (Invitation). As a local account for an Azure Active Directory B2C tenant (LocalAccount). Through self-service sign-up by an internal user using email verification (EmailVerified). Through self-service sign-up by a guest signing up through a link that is part of a user flow (SelfServiceSignUp). Read-only.Requires $select to retrieve. Supports $filter (eq, ne, not, in)."
|
|
621
621
|
).nullish(),
|
|
622
622
|
customSecurityAttributes: microsoft_graph_customSecurityAttributeValue.optional(),
|
|
623
623
|
department: z.string().describe(
|
|
624
|
-
"The name of the department in which the user works. Maximum length is 64 characters.
|
|
624
|
+
"The name of the department in which the user works. Maximum length is 64 characters. Requires $select to retrieve. Supports $filter (eq, ne, not , ge, le, in, and eq on null values)."
|
|
625
625
|
).nullish(),
|
|
626
626
|
deviceEnrollmentLimit: z.number().gte(-2147483648).lte(2147483647).describe(
|
|
627
627
|
"The limit on the maximum number of devices that the user is permitted to enroll. Allowed values are 5 or 1000."
|
|
@@ -629,10 +629,10 @@ const microsoft_graph_user = z.object({
|
|
|
629
629
|
employeeHireDate: z.string().regex(
|
|
630
630
|
/^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$/
|
|
631
631
|
).datetime({ offset: true }).describe(
|
|
632
|
-
"The date and time when the user was hired or will start work in a future hire.
|
|
632
|
+
"The date and time when the user was hired or will start work in a future hire. Requires $select to retrieve. Supports $filter (eq, ne, not , ge, le, in)."
|
|
633
633
|
).nullish(),
|
|
634
634
|
employeeId: z.string().describe(
|
|
635
|
-
"The employee identifier assigned to the user by the organization. The maximum length is 16 characters.
|
|
635
|
+
"The employee identifier assigned to the user by the organization. The maximum length is 16 characters. Requires $select to retrieve. Supports $filter (eq, ne, not , ge, le, in, startsWith, and eq on null values)."
|
|
636
636
|
).nullish(),
|
|
637
637
|
employeeLeaveDateTime: z.string().regex(
|
|
638
638
|
/^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$/
|
|
@@ -1382,16 +1382,16 @@ const microsoft_graph_group = z.object({
|
|
|
1382
1382
|
"Date and time when this object was deleted. Always null when the object hasn't been deleted."
|
|
1383
1383
|
).nullish(),
|
|
1384
1384
|
allowExternalSenders: z.boolean().describe(
|
|
1385
|
-
"Indicates if people external to the organization can send messages to the group. The default value is false.
|
|
1385
|
+
"Indicates if people external to the organization can send messages to the group. The default value is false. Requires $select to retrieve. Supported only on the Get group API (GET /groups/{ID})."
|
|
1386
1386
|
).nullish(),
|
|
1387
1387
|
assignedLabels: z.array(microsoft_graph_assignedLabel).describe(
|
|
1388
|
-
"The list of sensitivity label pairs (label ID, label name) associated with a Microsoft 365 group.
|
|
1388
|
+
"The list of sensitivity label pairs (label ID, label name) associated with a Microsoft 365 group. Requires $select to retrieve. This property can be updated only in delegated scenarios where the caller requires both the Microsoft Graph permission and a supported administrator role."
|
|
1389
1389
|
).optional(),
|
|
1390
1390
|
assignedLicenses: z.array(microsoft_graph_assignedLicense).describe(
|
|
1391
|
-
"The licenses that are assigned to the group.
|
|
1391
|
+
"The licenses that are assigned to the group. Requires $select to retrieve. Supports $filter (eq). Read-only."
|
|
1392
1392
|
).optional(),
|
|
1393
1393
|
autoSubscribeNewMembers: z.boolean().describe(
|
|
1394
|
-
"Indicates if new members added to the group are autosubscribed to receive email notifications. You can set this property in a PATCH request for the group; don't set it in the initial POST request that creates the group. Default value is false.
|
|
1394
|
+
"Indicates if new members added to the group are autosubscribed to receive email notifications. You can set this property in a PATCH request for the group; don't set it in the initial POST request that creates the group. Default value is false. Requires $select to retrieve. Supported only on the Get group API (GET /groups/{ID})."
|
|
1395
1395
|
).nullish(),
|
|
1396
1396
|
classification: z.string().describe(
|
|
1397
1397
|
"Describes a classification for the group (such as low, medium, or high business impact). Valid values for this property are defined by creating a ClassificationList setting value, based on the template definition.Returned by default. Supports $filter (eq, ne, not, ge, le, startsWith)."
|
|
@@ -1408,10 +1408,10 @@ const microsoft_graph_group = z.object({
|
|
|
1408
1408
|
"Indicates whether there are members in this group that have license errors from its group-based license assignment. This property is never returned on a GET operation. You can use it as a $filter argument to get groups that have members with license errors (that is, filter for this property being true). See an example. Supports $filter (eq)."
|
|
1409
1409
|
).nullish(),
|
|
1410
1410
|
hideFromAddressLists: z.boolean().describe(
|
|
1411
|
-
"True if the group isn't displayed in certain parts of the Outlook UI: the Address Book, address lists for selecting message recipients, and the Browse Groups dialog for searching groups; otherwise, false. The default value is false.
|
|
1411
|
+
"True if the group isn't displayed in certain parts of the Outlook UI: the Address Book, address lists for selecting message recipients, and the Browse Groups dialog for searching groups; otherwise, false. The default value is false. Requires $select to retrieve. Supported only on the Get group API (GET /groups/{ID})."
|
|
1412
1412
|
).nullish(),
|
|
1413
1413
|
hideFromOutlookClients: z.boolean().describe(
|
|
1414
|
-
"True if the group isn't displayed in Outlook clients, such as Outlook for Windows and Outlook on the web; otherwise, false. The default value is false.
|
|
1414
|
+
"True if the group isn't displayed in Outlook clients, such as Outlook for Windows and Outlook on the web; otherwise, false. The default value is false. Requires $select to retrieve. Supported only on the Get group API (GET /groups/{ID})."
|
|
1415
1415
|
).nullish(),
|
|
1416
1416
|
isArchived: z.boolean().describe(
|
|
1417
1417
|
"When a group is associated with a team, this property determines whether the team is in read-only mode.To read this property, use the /group/{groupId}/team endpoint or the Get team API. To update this property, use the archiveTeam and unarchiveTeam APIs."
|
|
@@ -1420,10 +1420,10 @@ const microsoft_graph_group = z.object({
|
|
|
1420
1420
|
"Indicates whether this group can be assigned to a Microsoft Entra role. Optional. This property can only be set while creating the group and is immutable. If set to true, the securityEnabled property must also be set to true, visibility must be Hidden, and the group can't be a dynamic group (that is, groupTypes can't contain DynamicMembership). Only callers with at least the Privileged Role Administrator role can set this property. The caller must also be assigned the RoleManagement.ReadWrite.Directory permission to set this property or update the membership of such groups. For more, see Using a group to manage Microsoft Entra role assignmentsUsing this feature requires a Microsoft Entra ID P1 license. Returned by default. Supports $filter (eq, ne, not)."
|
|
1421
1421
|
).nullish(),
|
|
1422
1422
|
isManagementRestricted: z.boolean().describe(
|
|
1423
|
-
"Indicates whether the group is a member of a restricted management administrative unit. If not set, the default value is null and the default behavior is false. Read-only. To manage a group member of a restricted management administrative unit, the administrator or calling app must be assigned a Microsoft Entra role at the scope of the restricted management administrative unit.
|
|
1423
|
+
"Indicates whether the group is a member of a restricted management administrative unit. If not set, the default value is null and the default behavior is false. Read-only. To manage a group member of a restricted management administrative unit, the administrator or calling app must be assigned a Microsoft Entra role at the scope of the restricted management administrative unit. Requires $select to retrieve."
|
|
1424
1424
|
).nullish(),
|
|
1425
1425
|
isSubscribedByMail: z.boolean().describe(
|
|
1426
|
-
"Indicates whether the signed-in user is subscribed to receive email conversations. The default value is true.
|
|
1426
|
+
"Indicates whether the signed-in user is subscribed to receive email conversations. The default value is true. Requires $select to retrieve. Supported only on the Get group API (GET /groups/{ID})."
|
|
1427
1427
|
).nullish(),
|
|
1428
1428
|
licenseProcessingState: microsoft_graph_licenseProcessingState.optional(),
|
|
1429
1429
|
mail: z.string().describe(
|
|
@@ -1519,7 +1519,7 @@ const microsoft_graph_post = z.lazy(
|
|
|
1519
1519
|
);
|
|
1520
1520
|
const microsoft_graph_conversationThread = z.object({
|
|
1521
1521
|
id: z.string().describe("The unique identifier for an entity. Read-only.").optional(),
|
|
1522
|
-
ccRecipients: z.array(microsoft_graph_recipient).describe("The Cc: recipients for the thread.
|
|
1522
|
+
ccRecipients: z.array(microsoft_graph_recipient).describe("The Cc: recipients for the thread. Requires $select to retrieve.").optional(),
|
|
1523
1523
|
hasAttachments: z.boolean().describe(
|
|
1524
1524
|
"Indicates whether any of the posts within this thread has at least one attachment. Returned by default."
|
|
1525
1525
|
).optional(),
|
|
@@ -1535,7 +1535,7 @@ const microsoft_graph_conversationThread = z.object({
|
|
|
1535
1535
|
topic: z.string().describe(
|
|
1536
1536
|
"The topic of the conversation. This property can be set when the conversation is created, but it cannot be updated. Returned by default."
|
|
1537
1537
|
).optional(),
|
|
1538
|
-
toRecipients: z.array(microsoft_graph_recipient).describe("The To: recipients for the thread.
|
|
1538
|
+
toRecipients: z.array(microsoft_graph_recipient).describe("The To: recipients for the thread. Requires $select to retrieve.").optional(),
|
|
1539
1539
|
uniqueSenders: z.array(z.string()).describe("All the users that sent a message to this thread. Returned by default.").optional(),
|
|
1540
1540
|
posts: z.array(microsoft_graph_post).optional()
|
|
1541
1541
|
}).passthrough();
|
|
@@ -2550,6 +2550,7 @@ const microsoft_graph_teamVisibilityType = z.enum([
|
|
|
2550
2550
|
"hiddenMembership",
|
|
2551
2551
|
"unknownFutureValue"
|
|
2552
2552
|
]);
|
|
2553
|
+
const microsoft_graph_channelLayoutType = z.enum(["post", "chat", "unknownFutureValue"]);
|
|
2553
2554
|
const microsoft_graph_channelMembershipType = z.enum([
|
|
2554
2555
|
"standard",
|
|
2555
2556
|
"private",
|
|
@@ -2587,6 +2588,7 @@ const microsoft_graph_channel = z.lazy(
|
|
|
2587
2588
|
isFavoriteByDefault: z.boolean().describe(
|
|
2588
2589
|
"Indicates whether the channel should be marked as recommended for all members of the team to show in their channel list. Note: All recommended channels automatically show in the channels list for education and frontline worker users. The property can only be set programmatically via the Create team method. The default value is false."
|
|
2589
2590
|
).nullish(),
|
|
2591
|
+
layoutType: microsoft_graph_channelLayoutType.optional(),
|
|
2590
2592
|
membershipType: microsoft_graph_channelMembershipType.optional(),
|
|
2591
2593
|
migrationMode: microsoft_graph_migrationMode.optional(),
|
|
2592
2594
|
originalCreatedDateTime: z.string().regex(
|
|
@@ -2911,7 +2913,7 @@ const microsoft_graph_message = z.object({
|
|
|
2911
2913
|
).nullish(),
|
|
2912
2914
|
inferenceClassification: microsoft_graph_inferenceClassificationType.optional(),
|
|
2913
2915
|
internetMessageHeaders: z.array(microsoft_graph_internetMessageHeader).describe(
|
|
2914
|
-
"A collection of message headers defined by RFC5322. The set includes message headers indicating the network path taken by a message from the sender to the recipient. It can also contain custom message headers that hold app data for the message.
|
|
2916
|
+
"A collection of message headers defined by RFC5322. The set includes message headers indicating the network path taken by a message from the sender to the recipient. It can also contain custom message headers that hold app data for the message. Requires $select to retrieve. Read-only."
|
|
2915
2917
|
).optional(),
|
|
2916
2918
|
internetMessageId: z.string().describe("The message ID in the format specified by RFC2822.").nullish(),
|
|
2917
2919
|
isDeliveryReceiptRequested: z.boolean().describe("Indicates whether a read receipt is requested for the message.").nullish(),
|
|
@@ -4567,6 +4569,7 @@ const schemas = {
|
|
|
4567
4569
|
microsoft_graph_teamSpecialization,
|
|
4568
4570
|
microsoft_graph_teamSummary,
|
|
4569
4571
|
microsoft_graph_teamVisibilityType,
|
|
4572
|
+
microsoft_graph_channelLayoutType,
|
|
4570
4573
|
microsoft_graph_channelMembershipType,
|
|
4571
4574
|
microsoft_graph_channelSummary,
|
|
4572
4575
|
microsoft_graph_sharedWithChannelTeamInfo,
|
|
@@ -4744,6 +4747,22 @@ const schemas = {
|
|
|
4744
4747
|
microsoft_graph_userCollectionResponse
|
|
4745
4748
|
};
|
|
4746
4749
|
const endpoints = makeApi([
|
|
4750
|
+
{
|
|
4751
|
+
method: "post",
|
|
4752
|
+
path: "/chats",
|
|
4753
|
+
alias: "create-chat",
|
|
4754
|
+
description: `Create a new chat object.`,
|
|
4755
|
+
requestFormat: "json",
|
|
4756
|
+
parameters: [
|
|
4757
|
+
{
|
|
4758
|
+
name: "body",
|
|
4759
|
+
description: `New entity`,
|
|
4760
|
+
type: "Body",
|
|
4761
|
+
schema: microsoft_graph_chat
|
|
4762
|
+
}
|
|
4763
|
+
],
|
|
4764
|
+
response: z.void()
|
|
4765
|
+
},
|
|
4747
4766
|
{
|
|
4748
4767
|
method: "get",
|
|
4749
4768
|
path: "/chats/:chatId",
|
|
@@ -5972,16 +5991,16 @@ You can search within a folder hierarchy, a whole drive, or files shared with th
|
|
|
5972
5991
|
"Date and time when this object was deleted. Always null when the object hasn't been deleted."
|
|
5973
5992
|
).nullish(),
|
|
5974
5993
|
allowExternalSenders: z.boolean().describe(
|
|
5975
|
-
"Indicates if people external to the organization can send messages to the group. The default value is false.
|
|
5994
|
+
"Indicates if people external to the organization can send messages to the group. The default value is false. Requires $select to retrieve. Supported only on the Get group API (GET /groups/{ID})."
|
|
5976
5995
|
).nullish(),
|
|
5977
5996
|
assignedLabels: z.array(microsoft_graph_assignedLabel).describe(
|
|
5978
|
-
"The list of sensitivity label pairs (label ID, label name) associated with a Microsoft 365 group.
|
|
5997
|
+
"The list of sensitivity label pairs (label ID, label name) associated with a Microsoft 365 group. Requires $select to retrieve. This property can be updated only in delegated scenarios where the caller requires both the Microsoft Graph permission and a supported administrator role."
|
|
5979
5998
|
).optional(),
|
|
5980
5999
|
assignedLicenses: z.array(microsoft_graph_assignedLicense).describe(
|
|
5981
|
-
"The licenses that are assigned to the group.
|
|
6000
|
+
"The licenses that are assigned to the group. Requires $select to retrieve. Supports $filter (eq). Read-only."
|
|
5982
6001
|
).optional(),
|
|
5983
6002
|
autoSubscribeNewMembers: z.boolean().describe(
|
|
5984
|
-
"Indicates if new members added to the group are autosubscribed to receive email notifications. You can set this property in a PATCH request for the group; don't set it in the initial POST request that creates the group. Default value is false.
|
|
6003
|
+
"Indicates if new members added to the group are autosubscribed to receive email notifications. You can set this property in a PATCH request for the group; don't set it in the initial POST request that creates the group. Default value is false. Requires $select to retrieve. Supported only on the Get group API (GET /groups/{ID})."
|
|
5985
6004
|
).nullish(),
|
|
5986
6005
|
classification: z.string().describe(
|
|
5987
6006
|
"Describes a classification for the group (such as low, medium, or high business impact). Valid values for this property are defined by creating a ClassificationList setting value, based on the template definition.Returned by default. Supports $filter (eq, ne, not, ge, le, startsWith)."
|
|
@@ -5998,10 +6017,10 @@ You can search within a folder hierarchy, a whole drive, or files shared with th
|
|
|
5998
6017
|
"Indicates whether there are members in this group that have license errors from its group-based license assignment. This property is never returned on a GET operation. You can use it as a $filter argument to get groups that have members with license errors (that is, filter for this property being true). See an example. Supports $filter (eq)."
|
|
5999
6018
|
).nullish(),
|
|
6000
6019
|
hideFromAddressLists: z.boolean().describe(
|
|
6001
|
-
"True if the group isn't displayed in certain parts of the Outlook UI: the Address Book, address lists for selecting message recipients, and the Browse Groups dialog for searching groups; otherwise, false. The default value is false.
|
|
6020
|
+
"True if the group isn't displayed in certain parts of the Outlook UI: the Address Book, address lists for selecting message recipients, and the Browse Groups dialog for searching groups; otherwise, false. The default value is false. Requires $select to retrieve. Supported only on the Get group API (GET /groups/{ID})."
|
|
6002
6021
|
).nullish(),
|
|
6003
6022
|
hideFromOutlookClients: z.boolean().describe(
|
|
6004
|
-
"True if the group isn't displayed in Outlook clients, such as Outlook for Windows and Outlook on the web; otherwise, false. The default value is false.
|
|
6023
|
+
"True if the group isn't displayed in Outlook clients, such as Outlook for Windows and Outlook on the web; otherwise, false. The default value is false. Requires $select to retrieve. Supported only on the Get group API (GET /groups/{ID})."
|
|
6005
6024
|
).nullish(),
|
|
6006
6025
|
isArchived: z.boolean().describe(
|
|
6007
6026
|
"When a group is associated with a team, this property determines whether the team is in read-only mode.To read this property, use the /group/{groupId}/team endpoint or the Get team API. To update this property, use the archiveTeam and unarchiveTeam APIs."
|
|
@@ -6010,10 +6029,10 @@ You can search within a folder hierarchy, a whole drive, or files shared with th
|
|
|
6010
6029
|
"Indicates whether this group can be assigned to a Microsoft Entra role. Optional. This property can only be set while creating the group and is immutable. If set to true, the securityEnabled property must also be set to true, visibility must be Hidden, and the group can't be a dynamic group (that is, groupTypes can't contain DynamicMembership). Only callers with at least the Privileged Role Administrator role can set this property. The caller must also be assigned the RoleManagement.ReadWrite.Directory permission to set this property or update the membership of such groups. For more, see Using a group to manage Microsoft Entra role assignmentsUsing this feature requires a Microsoft Entra ID P1 license. Returned by default. Supports $filter (eq, ne, not)."
|
|
6011
6030
|
).nullish(),
|
|
6012
6031
|
isManagementRestricted: z.boolean().describe(
|
|
6013
|
-
"Indicates whether the group is a member of a restricted management administrative unit. If not set, the default value is null and the default behavior is false. Read-only. To manage a group member of a restricted management administrative unit, the administrator or calling app must be assigned a Microsoft Entra role at the scope of the restricted management administrative unit.
|
|
6032
|
+
"Indicates whether the group is a member of a restricted management administrative unit. If not set, the default value is null and the default behavior is false. Read-only. To manage a group member of a restricted management administrative unit, the administrator or calling app must be assigned a Microsoft Entra role at the scope of the restricted management administrative unit. Requires $select to retrieve."
|
|
6014
6033
|
).nullish(),
|
|
6015
6034
|
isSubscribedByMail: z.boolean().describe(
|
|
6016
|
-
"Indicates whether the signed-in user is subscribed to receive email conversations. The default value is true.
|
|
6035
|
+
"Indicates whether the signed-in user is subscribed to receive email conversations. The default value is true. Requires $select to retrieve. Supported only on the Get group API (GET /groups/{ID})."
|
|
6017
6036
|
).nullish(),
|
|
6018
6037
|
licenseProcessingState: microsoft_graph_licenseProcessingState.optional(),
|
|
6019
6038
|
mail: z.string().describe(
|
|
@@ -6087,16 +6106,16 @@ You can create or update the following types of group: By default, this operatio
|
|
|
6087
6106
|
"Date and time when this object was deleted. Always null when the object hasn't been deleted."
|
|
6088
6107
|
).nullish(),
|
|
6089
6108
|
allowExternalSenders: z.boolean().describe(
|
|
6090
|
-
"Indicates if people external to the organization can send messages to the group. The default value is false.
|
|
6109
|
+
"Indicates if people external to the organization can send messages to the group. The default value is false. Requires $select to retrieve. Supported only on the Get group API (GET /groups/{ID})."
|
|
6091
6110
|
).nullish(),
|
|
6092
6111
|
assignedLabels: z.array(microsoft_graph_assignedLabel).describe(
|
|
6093
|
-
"The list of sensitivity label pairs (label ID, label name) associated with a Microsoft 365 group.
|
|
6112
|
+
"The list of sensitivity label pairs (label ID, label name) associated with a Microsoft 365 group. Requires $select to retrieve. This property can be updated only in delegated scenarios where the caller requires both the Microsoft Graph permission and a supported administrator role."
|
|
6094
6113
|
).optional(),
|
|
6095
6114
|
assignedLicenses: z.array(microsoft_graph_assignedLicense).describe(
|
|
6096
|
-
"The licenses that are assigned to the group.
|
|
6115
|
+
"The licenses that are assigned to the group. Requires $select to retrieve. Supports $filter (eq). Read-only."
|
|
6097
6116
|
).optional(),
|
|
6098
6117
|
autoSubscribeNewMembers: z.boolean().describe(
|
|
6099
|
-
"Indicates if new members added to the group are autosubscribed to receive email notifications. You can set this property in a PATCH request for the group; don't set it in the initial POST request that creates the group. Default value is false.
|
|
6118
|
+
"Indicates if new members added to the group are autosubscribed to receive email notifications. You can set this property in a PATCH request for the group; don't set it in the initial POST request that creates the group. Default value is false. Requires $select to retrieve. Supported only on the Get group API (GET /groups/{ID})."
|
|
6100
6119
|
).nullish(),
|
|
6101
6120
|
classification: z.string().describe(
|
|
6102
6121
|
"Describes a classification for the group (such as low, medium, or high business impact). Valid values for this property are defined by creating a ClassificationList setting value, based on the template definition.Returned by default. Supports $filter (eq, ne, not, ge, le, startsWith)."
|
|
@@ -6113,10 +6132,10 @@ You can create or update the following types of group: By default, this operatio
|
|
|
6113
6132
|
"Indicates whether there are members in this group that have license errors from its group-based license assignment. This property is never returned on a GET operation. You can use it as a $filter argument to get groups that have members with license errors (that is, filter for this property being true). See an example. Supports $filter (eq)."
|
|
6114
6133
|
).nullish(),
|
|
6115
6134
|
hideFromAddressLists: z.boolean().describe(
|
|
6116
|
-
"True if the group isn't displayed in certain parts of the Outlook UI: the Address Book, address lists for selecting message recipients, and the Browse Groups dialog for searching groups; otherwise, false. The default value is false.
|
|
6135
|
+
"True if the group isn't displayed in certain parts of the Outlook UI: the Address Book, address lists for selecting message recipients, and the Browse Groups dialog for searching groups; otherwise, false. The default value is false. Requires $select to retrieve. Supported only on the Get group API (GET /groups/{ID})."
|
|
6117
6136
|
).nullish(),
|
|
6118
6137
|
hideFromOutlookClients: z.boolean().describe(
|
|
6119
|
-
"True if the group isn't displayed in Outlook clients, such as Outlook for Windows and Outlook on the web; otherwise, false. The default value is false.
|
|
6138
|
+
"True if the group isn't displayed in Outlook clients, such as Outlook for Windows and Outlook on the web; otherwise, false. The default value is false. Requires $select to retrieve. Supported only on the Get group API (GET /groups/{ID})."
|
|
6120
6139
|
).nullish(),
|
|
6121
6140
|
isArchived: z.boolean().describe(
|
|
6122
6141
|
"When a group is associated with a team, this property determines whether the team is in read-only mode.To read this property, use the /group/{groupId}/team endpoint or the Get team API. To update this property, use the archiveTeam and unarchiveTeam APIs."
|
|
@@ -6125,10 +6144,10 @@ You can create or update the following types of group: By default, this operatio
|
|
|
6125
6144
|
"Indicates whether this group can be assigned to a Microsoft Entra role. Optional. This property can only be set while creating the group and is immutable. If set to true, the securityEnabled property must also be set to true, visibility must be Hidden, and the group can't be a dynamic group (that is, groupTypes can't contain DynamicMembership). Only callers with at least the Privileged Role Administrator role can set this property. The caller must also be assigned the RoleManagement.ReadWrite.Directory permission to set this property or update the membership of such groups. For more, see Using a group to manage Microsoft Entra role assignmentsUsing this feature requires a Microsoft Entra ID P1 license. Returned by default. Supports $filter (eq, ne, not)."
|
|
6126
6145
|
).nullish(),
|
|
6127
6146
|
isManagementRestricted: z.boolean().describe(
|
|
6128
|
-
"Indicates whether the group is a member of a restricted management administrative unit. If not set, the default value is null and the default behavior is false. Read-only. To manage a group member of a restricted management administrative unit, the administrator or calling app must be assigned a Microsoft Entra role at the scope of the restricted management administrative unit.
|
|
6147
|
+
"Indicates whether the group is a member of a restricted management administrative unit. If not set, the default value is null and the default behavior is false. Read-only. To manage a group member of a restricted management administrative unit, the administrator or calling app must be assigned a Microsoft Entra role at the scope of the restricted management administrative unit. Requires $select to retrieve."
|
|
6129
6148
|
).nullish(),
|
|
6130
6149
|
isSubscribedByMail: z.boolean().describe(
|
|
6131
|
-
"Indicates whether the signed-in user is subscribed to receive email conversations. The default value is true.
|
|
6150
|
+
"Indicates whether the signed-in user is subscribed to receive email conversations. The default value is true. Requires $select to retrieve. Supported only on the Get group API (GET /groups/{ID})."
|
|
6132
6151
|
).nullish(),
|
|
6133
6152
|
licenseProcessingState: microsoft_graph_licenseProcessingState.optional(),
|
|
6134
6153
|
mail: z.string().describe(
|
|
@@ -8503,7 +8522,7 @@ folder collection and navigate to another folder. By default, this operation doe
|
|
|
8503
8522
|
).nullish(),
|
|
8504
8523
|
inferenceClassification: microsoft_graph_inferenceClassificationType.optional(),
|
|
8505
8524
|
internetMessageHeaders: z.array(microsoft_graph_internetMessageHeader).describe(
|
|
8506
|
-
"A collection of message headers defined by RFC5322. The set includes message headers indicating the network path taken by a message from the sender to the recipient. It can also contain custom message headers that hold app data for the message.
|
|
8525
|
+
"A collection of message headers defined by RFC5322. The set includes message headers indicating the network path taken by a message from the sender to the recipient. It can also contain custom message headers that hold app data for the message. Requires $select to retrieve. Read-only."
|
|
8507
8526
|
).optional(),
|
|
8508
8527
|
internetMessageId: z.string().describe("The message ID in the format specified by RFC2822.").nullish(),
|
|
8509
8528
|
isDeliveryReceiptRequested: z.boolean().describe("Indicates whether a read receipt is requested for the message.").nullish(),
|
|
@@ -8585,7 +8604,7 @@ folder collection and navigate to another folder. By default, this operation doe
|
|
|
8585
8604
|
).nullish(),
|
|
8586
8605
|
inferenceClassification: microsoft_graph_inferenceClassificationType.optional(),
|
|
8587
8606
|
internetMessageHeaders: z.array(microsoft_graph_internetMessageHeader).describe(
|
|
8588
|
-
"A collection of message headers defined by RFC5322. The set includes message headers indicating the network path taken by a message from the sender to the recipient. It can also contain custom message headers that hold app data for the message.
|
|
8607
|
+
"A collection of message headers defined by RFC5322. The set includes message headers indicating the network path taken by a message from the sender to the recipient. It can also contain custom message headers that hold app data for the message. Requires $select to retrieve. Read-only."
|
|
8589
8608
|
).optional(),
|
|
8590
8609
|
internetMessageId: z.string().describe("The message ID in the format specified by RFC2822.").nullish(),
|
|
8591
8610
|
isDeliveryReceiptRequested: z.boolean().describe("Indicates whether a read receipt is requested for the message.").nullish(),
|
|
@@ -54,11 +54,17 @@ async function exchangeCodeForToken(code, redirectUri, clientId, clientSecret, t
|
|
|
54
54
|
if (codeVerifier) {
|
|
55
55
|
params.append("code_verifier", codeVerifier);
|
|
56
56
|
}
|
|
57
|
+
const headers = {
|
|
58
|
+
"Content-Type": "application/x-www-form-urlencoded"
|
|
59
|
+
};
|
|
60
|
+
try {
|
|
61
|
+
const redirectUrl = new URL(redirectUri);
|
|
62
|
+
headers["Origin"] = redirectUrl.origin;
|
|
63
|
+
} catch {
|
|
64
|
+
}
|
|
57
65
|
const response = await fetch(`${cloudEndpoints.authority}/${tenantId}/oauth2/v2.0/token`, {
|
|
58
66
|
method: "POST",
|
|
59
|
-
headers
|
|
60
|
-
"Content-Type": "application/x-www-form-urlencoded"
|
|
61
|
-
},
|
|
67
|
+
headers,
|
|
62
68
|
body: params
|
|
63
69
|
});
|
|
64
70
|
if (!response.ok) {
|
|
@@ -68,7 +74,7 @@ async function exchangeCodeForToken(code, redirectUri, clientId, clientSecret, t
|
|
|
68
74
|
}
|
|
69
75
|
return response.json();
|
|
70
76
|
}
|
|
71
|
-
async function refreshAccessToken(refreshToken, clientId, clientSecret, tenantId = "common", cloudType = "global") {
|
|
77
|
+
async function refreshAccessToken(refreshToken, clientId, clientSecret, tenantId = "common", cloudType = "global", origin) {
|
|
72
78
|
const cloudEndpoints = getCloudEndpoints(cloudType);
|
|
73
79
|
const params = new URLSearchParams({
|
|
74
80
|
grant_type: "refresh_token",
|
|
@@ -78,11 +84,15 @@ async function refreshAccessToken(refreshToken, clientId, clientSecret, tenantId
|
|
|
78
84
|
if (clientSecret) {
|
|
79
85
|
params.append("client_secret", clientSecret);
|
|
80
86
|
}
|
|
87
|
+
const headers = {
|
|
88
|
+
"Content-Type": "application/x-www-form-urlencoded"
|
|
89
|
+
};
|
|
90
|
+
if (origin) {
|
|
91
|
+
headers["Origin"] = origin;
|
|
92
|
+
}
|
|
81
93
|
const response = await fetch(`${cloudEndpoints.authority}/${tenantId}/oauth2/v2.0/token`, {
|
|
82
94
|
method: "POST",
|
|
83
|
-
headers
|
|
84
|
-
"Content-Type": "application/x-www-form-urlencoded"
|
|
85
|
-
},
|
|
95
|
+
headers,
|
|
86
96
|
body: params
|
|
87
97
|
});
|
|
88
98
|
if (!response.ok) {
|
package/dist/server.js
CHANGED
|
@@ -266,7 +266,17 @@ class MicrosoftGraphServer {
|
|
|
266
266
|
}
|
|
267
267
|
microsoftAuthUrl.searchParams.set("client_id", clientId);
|
|
268
268
|
if (!microsoftAuthUrl.searchParams.get("scope")) {
|
|
269
|
-
microsoftAuthUrl.searchParams.set(
|
|
269
|
+
microsoftAuthUrl.searchParams.set(
|
|
270
|
+
"scope",
|
|
271
|
+
"User.Read Files.Read Mail.Read offline_access"
|
|
272
|
+
);
|
|
273
|
+
} else {
|
|
274
|
+
const scopeValue = microsoftAuthUrl.searchParams.get("scope");
|
|
275
|
+
const scopeList = scopeValue.split(/\s+/).filter(Boolean);
|
|
276
|
+
if (!scopeList.includes("offline_access")) {
|
|
277
|
+
scopeList.push("offline_access");
|
|
278
|
+
microsoftAuthUrl.searchParams.set("scope", scopeList.join(" "));
|
|
279
|
+
}
|
|
270
280
|
}
|
|
271
281
|
res.redirect(microsoftAuthUrl.toString());
|
|
272
282
|
});
|
|
@@ -341,12 +351,14 @@ class MicrosoftGraphServer {
|
|
|
341
351
|
} else {
|
|
342
352
|
logger.info("Refresh endpoint: Using public client without client_secret");
|
|
343
353
|
}
|
|
354
|
+
const origin = req.get("origin") || req.get("referer") || void 0;
|
|
344
355
|
const result = await refreshAccessToken(
|
|
345
356
|
body.refresh_token,
|
|
346
357
|
clientId,
|
|
347
358
|
clientSecret,
|
|
348
359
|
tenantId,
|
|
349
|
-
this.secrets.cloudType
|
|
360
|
+
this.secrets.cloudType,
|
|
361
|
+
origin
|
|
350
362
|
);
|
|
351
363
|
res.json(result);
|
|
352
364
|
} else {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@softeria/ms-365-mcp-server",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.85.1",
|
|
4
4
|
"description": " A Model Context Protocol (MCP) server for interacting with Microsoft 365 and Office services through the Graph API",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
package/src/endpoints.json
CHANGED
|
@@ -1540,5 +1540,12 @@
|
|
|
1540
1540
|
"toolName": "remove-group-owner",
|
|
1541
1541
|
"workScopes": ["Group.ReadWrite.All"],
|
|
1542
1542
|
"llmTip": "Removes an owner from a group. A group must have at least one owner — this call fails if you try to remove the last owner. Use list-group-owners to find the owner's ID."
|
|
1543
|
+
},
|
|
1544
|
+
{
|
|
1545
|
+
"pathPattern": "/chats",
|
|
1546
|
+
"method": "post",
|
|
1547
|
+
"toolName": "create-chat",
|
|
1548
|
+
"workScopes": ["Chat.Create", "Chat.ReadWrite"],
|
|
1549
|
+
"llmTip": "Creates a new 1:1 or group Teams chat. Body: { chatType ('oneOnOne' or 'group'), topic (optional, group only), members: [{ '@odata.type': '#microsoft.graph.aadUserConversationMember', roles: ['owner' | 'guest'], 'user@odata.bind': 'https://graph.microsoft.com/v1.0/users({id})' }] }. A oneOnOne chat requires exactly 2 members (self + other), both with role 'owner'. For group chats, include all participants. The signed-in user must be one of the members. Returns the created chat with its id — use that id with send-chat-message, list-chat-members, etc."
|
|
1543
1550
|
}
|
|
1544
1551
|
]
|