Skip to content

Commit d3daab7

Browse files
waleedlatif1claude
andauthored
feat(microsoft-ad): add Azure AD (Entra ID) integration (#3686)
* feat(microsoft-ad): add Azure AD (Entra ID) integration Add complete Azure AD integration with 13 tools for managing users and groups via Microsoft Graph API v1.0. Includes OAuth config with PKCE, block definition with conditional subBlocks, and generated docs. Tools: list/get/create/update/delete users, list/get/create/update/delete groups, list/add/remove group members. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix(microsoft-ad): add $search/$filter guard, $count=true, and memberId validation - Prevent using $search and $filter together (Graph API rejects this) - Add $count=true when $search is used (required with ConsistencyLevel: eventual) - Validate and trim memberId in add_group_member body before use Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix(microsoft-ad): fix docsLink underscore and accountEnabled update safety - Change docsLink from microsoft-ad to microsoft_ad to match docs routing - Split accountEnabled dropdown into separate create/update subBlocks - Update operation shows "No Change" default (empty string) to prevent silently re-enabling disabled accounts when updating other fields - Create operation keeps "Yes" default as before Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix(microsoft-ad): prevent visibility from always being sent on group update Split visibility dropdown into separate create/update subBlocks with "No Change" default for update_group, preventing silent overwrite of group visibility when updating other fields like description. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix(microsoft-ad): prevent empty values leaking into PATCH requests - Use operation-aware checks for accountEnabled and visibility in block params to prevent create defaults bleeding into update operations - Change tool body guards from `!== undefined` to truthy checks so empty-string inputs from unfilled subBlocks are omitted from PATCH Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 0d22cc3 commit d3daab7

26 files changed

+2245
-1
lines changed

apps/docs/components/ui/icon-mapping.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import {
1616
AsanaIcon,
1717
AshbyIcon,
1818
AttioIcon,
19+
AzureIcon,
1920
BoxCompanyIcon,
2021
BrainIcon,
2122
BrandfetchIcon,
@@ -270,6 +271,7 @@ export const blockTypeToIconMap: Record<string, IconComponent> = {
270271
mailgun: MailgunIcon,
271272
mem0: Mem0Icon,
272273
memory: BrainIcon,
274+
microsoft_ad: AzureIcon,
273275
microsoft_dataverse: MicrosoftDataverseIcon,
274276
microsoft_excel_v2: MicrosoftExcelIcon,
275277
microsoft_planner: MicrosoftPlannerIcon,

apps/docs/content/docs/en/tools/meta.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@
9595
"mailgun",
9696
"mem0",
9797
"memory",
98+
"microsoft_ad",
9899
"microsoft_dataverse",
99100
"microsoft_excel",
100101
"microsoft_planner",
Lines changed: 336 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,336 @@
1+
---
2+
title: Azure AD
3+
description: Manage users and groups in Azure AD (Microsoft Entra ID)
4+
---
5+
6+
import { BlockInfoCard } from "@/components/ui/block-info-card"
7+
8+
<BlockInfoCard
9+
type="microsoft_ad"
10+
color="#0078D4"
11+
/>
12+
13+
{/* MANUAL-CONTENT-START:intro */}
14+
[Azure Active Directory](https://entra.microsoft.com) (now Microsoft Entra ID) is Microsoft's cloud-based identity and access management service. It helps organizations manage users, groups, and access to applications and resources across cloud and on-premises environments.
15+
16+
With the Azure AD integration in Sim, you can:
17+
18+
- **Manage users**: List, create, update, and delete user accounts in your directory
19+
- **Manage groups**: Create and configure security groups and Microsoft 365 groups
20+
- **Control group membership**: Add and remove members from groups programmatically
21+
- **Query directory data**: Search and filter users and groups using OData expressions
22+
- **Automate onboarding/offboarding**: Create new user accounts with initial passwords and enable/disable accounts as part of HR workflows
23+
24+
In Sim, the Azure AD integration enables your agents to programmatically manage your organization's identity infrastructure. This allows for automation scenarios such as provisioning new employees, updating user profiles in bulk, managing team group memberships, and auditing directory data. By connecting Sim with Azure AD, you can streamline identity lifecycle management and ensure your directory stays in sync with your organization's needs.
25+
26+
## Need Help?
27+
28+
If you encounter issues with the Azure AD integration, contact us at [help@sim.ai](mailto:help@sim.ai)
29+
{/* MANUAL-CONTENT-END */}
30+
31+
32+
## Usage Instructions
33+
34+
Integrate Azure Active Directory into your workflows. List, create, update, and delete users and groups. Manage group memberships programmatically.
35+
36+
37+
38+
## Tools
39+
40+
### `microsoft_ad_list_users`
41+
42+
List users in Azure AD (Microsoft Entra ID)
43+
44+
#### Input
45+
46+
| Parameter | Type | Required | Description |
47+
| --------- | ---- | -------- | ----------- |
48+
| `top` | number | No | Maximum number of users to return \(default 100, max 999\) |
49+
| `filter` | string | No | OData filter expression \(e.g., "department eq \'Sales\'"\) |
50+
| `search` | string | No | Search string to filter users by displayName or mail |
51+
52+
#### Output
53+
54+
| Parameter | Type | Description |
55+
| --------- | ---- | ----------- |
56+
| `users` | array | List of users |
57+
| `userCount` | number | Number of users returned |
58+
59+
### `microsoft_ad_get_user`
60+
61+
Get a user by ID or user principal name from Azure AD
62+
63+
#### Input
64+
65+
| Parameter | Type | Required | Description |
66+
| --------- | ---- | -------- | ----------- |
67+
| `userId` | string | Yes | User ID or user principal name \(e.g., "user@example.com"\) |
68+
69+
#### Output
70+
71+
| Parameter | Type | Description |
72+
| --------- | ---- | ----------- |
73+
| `user` | object | User details |
74+
|`id` | string | User ID |
75+
|`displayName` | string | Display name |
76+
|`givenName` | string | First name |
77+
|`surname` | string | Last name |
78+
|`userPrincipalName` | string | User principal name \(email\) |
79+
|`mail` | string | Email address |
80+
|`jobTitle` | string | Job title |
81+
|`department` | string | Department |
82+
|`officeLocation` | string | Office location |
83+
|`mobilePhone` | string | Mobile phone number |
84+
|`accountEnabled` | boolean | Whether the account is enabled |
85+
86+
### `microsoft_ad_create_user`
87+
88+
Create a new user in Azure AD (Microsoft Entra ID)
89+
90+
#### Input
91+
92+
| Parameter | Type | Required | Description |
93+
| --------- | ---- | -------- | ----------- |
94+
| `displayName` | string | Yes | Display name for the user |
95+
| `mailNickname` | string | Yes | Mail alias for the user |
96+
| `userPrincipalName` | string | Yes | User principal name \(e.g., "user@example.com"\) |
97+
| `password` | string | Yes | Initial password for the user |
98+
| `accountEnabled` | boolean | Yes | Whether the account is enabled |
99+
| `givenName` | string | No | First name |
100+
| `surname` | string | No | Last name |
101+
| `jobTitle` | string | No | Job title |
102+
| `department` | string | No | Department |
103+
| `officeLocation` | string | No | Office location |
104+
| `mobilePhone` | string | No | Mobile phone number |
105+
106+
#### Output
107+
108+
| Parameter | Type | Description |
109+
| --------- | ---- | ----------- |
110+
| `user` | object | Created user details |
111+
|`id` | string | User ID |
112+
|`displayName` | string | Display name |
113+
|`givenName` | string | First name |
114+
|`surname` | string | Last name |
115+
|`userPrincipalName` | string | User principal name \(email\) |
116+
|`mail` | string | Email address |
117+
|`jobTitle` | string | Job title |
118+
|`department` | string | Department |
119+
|`officeLocation` | string | Office location |
120+
|`mobilePhone` | string | Mobile phone number |
121+
|`accountEnabled` | boolean | Whether the account is enabled |
122+
123+
### `microsoft_ad_update_user`
124+
125+
Update user properties in Azure AD (Microsoft Entra ID)
126+
127+
#### Input
128+
129+
| Parameter | Type | Required | Description |
130+
| --------- | ---- | -------- | ----------- |
131+
| `userId` | string | Yes | User ID or user principal name |
132+
| `displayName` | string | No | Display name |
133+
| `givenName` | string | No | First name |
134+
| `surname` | string | No | Last name |
135+
| `jobTitle` | string | No | Job title |
136+
| `department` | string | No | Department |
137+
| `officeLocation` | string | No | Office location |
138+
| `mobilePhone` | string | No | Mobile phone number |
139+
| `accountEnabled` | boolean | No | Whether the account is enabled |
140+
141+
#### Output
142+
143+
| Parameter | Type | Description |
144+
| --------- | ---- | ----------- |
145+
| `updated` | boolean | Whether the update was successful |
146+
| `userId` | string | ID of the updated user |
147+
148+
### `microsoft_ad_delete_user`
149+
150+
Delete a user from Azure AD (Microsoft Entra ID). The user is moved to a temporary container and can be restored within 30 days.
151+
152+
#### Input
153+
154+
| Parameter | Type | Required | Description |
155+
| --------- | ---- | -------- | ----------- |
156+
| `userId` | string | Yes | User ID or user principal name |
157+
158+
#### Output
159+
160+
| Parameter | Type | Description |
161+
| --------- | ---- | ----------- |
162+
| `deleted` | boolean | Whether the deletion was successful |
163+
| `userId` | string | ID of the deleted user |
164+
165+
### `microsoft_ad_list_groups`
166+
167+
List groups in Azure AD (Microsoft Entra ID)
168+
169+
#### Input
170+
171+
| Parameter | Type | Required | Description |
172+
| --------- | ---- | -------- | ----------- |
173+
| `top` | number | No | Maximum number of groups to return \(default 100, max 999\) |
174+
| `filter` | string | No | OData filter expression \(e.g., "securityEnabled eq true"\) |
175+
| `search` | string | No | Search string to filter groups by displayName or description |
176+
177+
#### Output
178+
179+
| Parameter | Type | Description |
180+
| --------- | ---- | ----------- |
181+
| `groups` | array | List of groups |
182+
| `groupCount` | number | Number of groups returned |
183+
184+
### `microsoft_ad_get_group`
185+
186+
Get a group by ID from Azure AD (Microsoft Entra ID)
187+
188+
#### Input
189+
190+
| Parameter | Type | Required | Description |
191+
| --------- | ---- | -------- | ----------- |
192+
| `groupId` | string | Yes | Group ID |
193+
194+
#### Output
195+
196+
| Parameter | Type | Description |
197+
| --------- | ---- | ----------- |
198+
| `group` | object | Group details |
199+
|`id` | string | Group ID |
200+
|`displayName` | string | Display name |
201+
|`description` | string | Group description |
202+
|`mail` | string | Email address |
203+
|`mailEnabled` | boolean | Whether mail is enabled |
204+
|`mailNickname` | string | Mail nickname |
205+
|`securityEnabled` | boolean | Whether security is enabled |
206+
|`groupTypes` | array | Group types |
207+
|`visibility` | string | Group visibility |
208+
|`createdDateTime` | string | Creation date |
209+
210+
### `microsoft_ad_create_group`
211+
212+
Create a new group in Azure AD (Microsoft Entra ID)
213+
214+
#### Input
215+
216+
| Parameter | Type | Required | Description |
217+
| --------- | ---- | -------- | ----------- |
218+
| `displayName` | string | Yes | Display name for the group |
219+
| `mailNickname` | string | Yes | Mail alias for the group \(ASCII only, max 64 characters\) |
220+
| `description` | string | No | Group description |
221+
| `mailEnabled` | boolean | Yes | Whether mail is enabled \(true for Microsoft 365 groups\) |
222+
| `securityEnabled` | boolean | Yes | Whether security is enabled \(true for security groups\) |
223+
| `groupTypes` | string | No | Group type: "Unified" for Microsoft 365 group, leave empty for security group |
224+
| `visibility` | string | No | Group visibility: "Private" or "Public" |
225+
226+
#### Output
227+
228+
| Parameter | Type | Description |
229+
| --------- | ---- | ----------- |
230+
| `group` | object | Created group details |
231+
|`id` | string | Group ID |
232+
|`displayName` | string | Display name |
233+
|`description` | string | Group description |
234+
|`mail` | string | Email address |
235+
|`mailEnabled` | boolean | Whether mail is enabled |
236+
|`mailNickname` | string | Mail nickname |
237+
|`securityEnabled` | boolean | Whether security is enabled |
238+
|`groupTypes` | array | Group types |
239+
|`visibility` | string | Group visibility |
240+
|`createdDateTime` | string | Creation date |
241+
242+
### `microsoft_ad_update_group`
243+
244+
Update group properties in Azure AD (Microsoft Entra ID)
245+
246+
#### Input
247+
248+
| Parameter | Type | Required | Description |
249+
| --------- | ---- | -------- | ----------- |
250+
| `groupId` | string | Yes | Group ID |
251+
| `displayName` | string | No | Display name |
252+
| `description` | string | No | Group description |
253+
| `mailNickname` | string | No | Mail alias |
254+
| `visibility` | string | No | Group visibility: "Private" or "Public" |
255+
256+
#### Output
257+
258+
| Parameter | Type | Description |
259+
| --------- | ---- | ----------- |
260+
| `updated` | boolean | Whether the update was successful |
261+
| `groupId` | string | ID of the updated group |
262+
263+
### `microsoft_ad_delete_group`
264+
265+
Delete a group from Azure AD (Microsoft Entra ID). Microsoft 365 and security groups can be restored within 30 days.
266+
267+
#### Input
268+
269+
| Parameter | Type | Required | Description |
270+
| --------- | ---- | -------- | ----------- |
271+
| `groupId` | string | Yes | Group ID |
272+
273+
#### Output
274+
275+
| Parameter | Type | Description |
276+
| --------- | ---- | ----------- |
277+
| `deleted` | boolean | Whether the deletion was successful |
278+
| `groupId` | string | ID of the deleted group |
279+
280+
### `microsoft_ad_list_group_members`
281+
282+
List members of a group in Azure AD (Microsoft Entra ID)
283+
284+
#### Input
285+
286+
| Parameter | Type | Required | Description |
287+
| --------- | ---- | -------- | ----------- |
288+
| `groupId` | string | Yes | Group ID |
289+
| `top` | number | No | Maximum number of members to return \(default 100, max 999\) |
290+
291+
#### Output
292+
293+
| Parameter | Type | Description |
294+
| --------- | ---- | ----------- |
295+
| `members` | array | List of group members |
296+
| `memberCount` | number | Number of members returned |
297+
298+
### `microsoft_ad_add_group_member`
299+
300+
Add a member to a group in Azure AD (Microsoft Entra ID)
301+
302+
#### Input
303+
304+
| Parameter | Type | Required | Description |
305+
| --------- | ---- | -------- | ----------- |
306+
| `groupId` | string | Yes | Group ID |
307+
| `memberId` | string | Yes | User ID of the member to add |
308+
309+
#### Output
310+
311+
| Parameter | Type | Description |
312+
| --------- | ---- | ----------- |
313+
| `added` | boolean | Whether the member was added successfully |
314+
| `groupId` | string | Group ID |
315+
| `memberId` | string | Member ID that was added |
316+
317+
### `microsoft_ad_remove_group_member`
318+
319+
Remove a member from a group in Azure AD (Microsoft Entra ID)
320+
321+
#### Input
322+
323+
| Parameter | Type | Required | Description |
324+
| --------- | ---- | -------- | ----------- |
325+
| `groupId` | string | Yes | Group ID |
326+
| `memberId` | string | Yes | User ID of the member to remove |
327+
328+
#### Output
329+
330+
| Parameter | Type | Description |
331+
| --------- | ---- | ----------- |
332+
| `removed` | boolean | Whether the member was removed successfully |
333+
| `groupId` | string | Group ID |
334+
| `memberId` | string | Member ID that was removed |
335+
336+

0 commit comments

Comments
 (0)