Operations (sample payloads)
Main operationsCopy
Create userCopy
Create a user (work or school account).
Sample Input
1{2"display_name": "John Doe",3"mail_nickname": "johndoe",4"user_principal_name": "johndoe@contoso.com",5"account_enabled": true,6"password_profile": {7"password": "P@ssw0rd123!",8"force_change_password_next_sign_in": true9},10"given_name": "John",11"surname": "Doe",12"job_title": "Software Engineer",13"department": "IT",14"city": "Seattle",15"country": "United States",16"office_location": "Building A",17"postal_code": "98052",18"preferred_language": "en-US",19"state": "Washington",20"street_address": "123 Main St",21"mobile_phone": "+1 (555) 123-4567",22"usage_location": "US",23"custom_attributes": [24{25"name": "extension_366cf3460d404b83bfab6c4919066267_employeeID",26"value": "EMP12345"27}28]29}
Sample Output
1{2"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users/$entity",3"id": "48d31887-5fad-4d73-a9f5-3c356e68a038",4"businessPhones": [5"+1 (425) 555-0100"6],7"displayName": "John Doe",8"givenName": "John",9"jobTitle": "Software Engineer",10"mail": "johndoe@contoso.com",11"mobilePhone": "+1 (555) 123-4567",12"officeLocation": "Building A",13"preferredLanguage": "en-US",14"surname": "Doe",15"userPrincipalName": "johndoe@contoso.com"16}
Delete userCopy
Deletes a user
Sample Input
1{2"user_id": "a1b2c3d4-5e6f-7g8h-9i0j-k1l2m3n4o5p6"3}
Sample Output
1{2"success": true3}
Find B2C application (Beta)Copy
Attempts to find the B2C application automatically
Sample Input
1{}
Sample Output
1{2"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#applications/$entity",3"id": "a1b2c3d4-e5f6-7g8h-9i0j-1k2l3m4n5o6p",4"deletedDateTime": null,5"isFallbackPublicClient": false,6"appId": "q7r8s9t0-u1v2-w3x4-y5z6-7a8b9c0d1e2f",7"applicationTemplateId": null,8"identifierUris": [9"https://myb2capp.onmicrosoft.com"10],11"createdDateTime": "2023-04-15T10:30:00Z",12"displayName": "My B2C Application",13"isDeviceOnlyAuthSupported": false,14"groupMembershipClaims": "SecurityGroup",15"optionalClaims": null,16"orgRestrictions": [],17"publisherDomain": "myb2capp.onmicrosoft.com",18"signInAudience": "AzureADandPersonalMicrosoftAccount",19"tags": [],20"tokenEncryptionKeyId": null,21"api": {22"requestedAccessTokenVersion": 2,23"acceptMappedClaims": null,24"knownClientApplications": [],25"oauth2PermissionScopes": [26{27"adminConsentDescription": "Allow the application to access My B2C Application on behalf of the signed-in user.",28"adminConsentDisplayName": "Access My B2C Application",29"id": "e3f4g5h6-i7j8-k9l0-m1n2-o3p4q5r6s7t8",30"isEnabled": true,31"type": "User",32"userConsentDescription": "Allow the application to access My B2C Application on your behalf.",33"userConsentDisplayName": "Access My B2C Application",34"value": "user_impersonation"35}36],37"preAuthorizedApplications": []38},39"appRoles": [],40"publicClient": {41"redirectUris": []42},43"info": {44"termsOfServiceUrl": null,45"supportUrl": null,46"privacyStatementUrl": null,47"marketingUrl": null,48"logoUrl": null49},50"keyCredentials": [],51"parentalControlSettings": {52"countriesBlockedForMinors": [],53"legalAgeGroupRule": "Allow"54},55"passwordCredentials": [],56"requiredResourceAccess": [57{58"resourceAppId": "00000003-0000-0000-c000-000000000000",59"resourceAccess": [60{61"id": "e1fe6dd8-ba31-4d61-89e7-88639da4683d",62"type": "Scope"63}64]65}66],67"web": {68"redirectUris": [69"https://myb2capp.azurewebsites.net/signin-oidc"70],71"homePageUrl": "https://myb2capp.azurewebsites.net",72"logoutUrl": "https://myb2capp.azurewebsites.net/signout-oidc",73"implicitGrantSettings": {74"enableIdTokenIssuance": true,75"enableAccessTokenIssuance": false76}77}78}
Get application (Beta)Copy
Returns information about an application
Sample Input
1{2"object_id": "12345678-1234-1234-1234-1234567890ab"3}
Sample Output
1{2"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#applications/$entity",3"id": "12345678-1234-1234-1234-1234567890ab",4"deletedDateTime": null,5"isFallbackPublicClient": false,6"appId": "87654321-4321-4321-4321-ba0987654321",7"applicationTemplateId": null,8"identifierUris": [9"https://myapp.example.com"10],11"createdDateTime": "2023-05-15T10:30:00Z",12"displayName": "My Sample Application",13"isDeviceOnlyAuthSupported": false,14"groupMembershipClaims": "SecurityGroup",15"optionalClaims": null,16"orgRestrictions": [],17"publisherDomain": "example.com",18"signInAudience": "AzureADMyOrg",19"tags": [20"productivity",21"internal"22],23"tokenEncryptionKeyId": null,24"api": {25"requestedAccessTokenVersion": 2,26"acceptMappedClaims": null,27"knownClientApplications": [],28"oauth2PermissionScopes": [29{30"adminConsentDescription": "Allow the application to access My Sample Application on behalf of the signed-in user.",31"adminConsentDisplayName": "Access My Sample Application",32"id": "abcdef01-2345-6789-0123-456789abcdef",33"isEnabled": true,34"type": "User",35"userConsentDescription": "Allow the application to access My Sample Application on your behalf.",36"userConsentDisplayName": "Access My Sample Application",37"value": "user_impersonation"38}39],40"preAuthorizedApplications": []41},42"appRoles": [],43"publicClient": {44"redirectUris": []45},46"info": {47"termsOfServiceUrl": "https://example.com/terms",48"supportUrl": "https://example.com/support",49"privacyStatementUrl": "https://example.com/privacy",50"marketingUrl": null,51"logoUrl": null52},53"keyCredentials": [],54"parentalControlSettings": {55"countriesBlockedForMinors": [],56"legalAgeGroupRule": "Allow"57},58"passwordCredentials": [],59"requiredResourceAccess": [60{61"resourceAppId": "00000003-0000-0000-c000-000000000000",62"resourceAccess": [63{64"id": "e1fe6dd8-ba31-4d61-89e7-88639da4683d",65"type": "Scope"66}67]68}69],70"web": {71"redirectUris": [72"https://myapp.example.com/auth"73],74"homePageUrl": "https://myapp.example.com",75"logoutUrl": "https://myapp.example.com/logout",76"implicitGrantSettings": {77"enableIdTokenIssuance": true,78"enableAccessTokenIssuance": false79}80}81}
Get application extension properties (Beta)Copy
Returns extension properties of an application
Sample Input
1{2"object_id": "12345678-1234-1234-1234-1234567890ab"3}
Sample Output
1{2"@odata.context": "https://graph.microsoft.com/beta/$metadata#applications('12345678-1234-1234-1234-1234567890ab')/extensionProperties",3"value": [4{5"id": "98765432-9876-9876-9876-987654321cba",6"deletedDateTime": null,7"appDisplayName": "My Azure AD Application",8"name": "customAttribute1",9"dataType": "String",10"isSyncedFromOnPremises": false,11"targetObjects": [12"User"13]14},15{16"id": "abcdef12-abcd-abcd-abcd-abcdef123456",17"deletedDateTime": null,18"appDisplayName": "My Azure AD Application",19"name": "customAttribute2",20"dataType": "Integer",21"isSyncedFromOnPremises": false,22"targetObjects": [23"User",24"Group"25]26}27]28}
Get userCopy
Returns information about a user.
Sample Input
1{2"user_id": "12345678-1234-1234-1234-123456789012"3}
Sample Output
1{2"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users/$entity",3"businessPhones": [4"+1 (555) 123-4567"5],6"displayName": "John Doe",7"givenName": "John",8"jobTitle": "Software Engineer",9"mail": "john.doe@example.com",10"mobilePhone": "+1 (555) 987-6543",11"officeLocation": "Building A, Floor 3",12"preferredLanguage": "en-US",13"surname": "Doe",14"userPrincipalName": "john.doe@example.com",15"id": "12345678-1234-1234-1234-123456789012"16}
Get user custom attributes (Beta)Copy
Returns custom attributes for a user.
Sample Input
1{2"user_id": "12345678-1234-1234-1234-123456789012",3"attributes": [4"extension_366cf3460d404b83bfab6c4919066267_customAddr",5"extension_366cf3460d404b83bfab6c4919066267_employeeNumber"6]7}
Sample Output
1{2"@odata.context": "https://graph.microsoft.com/beta/$metadata#users('12345678-1234-1234-1234-123456789012')?$select=id,extension_366cf3460d404b83bfab6c4919066267_customAddr,extension_366cf3460d404b83bfab6c4919066267_employeeNumber",3"id": "12345678-1234-1234-1234-123456789012",4"extension_366cf3460d404b83bfab6c4919066267_customAddr": "123 Main St, Anytown, USA",5"extension_366cf3460d404b83bfab6c4919066267_employeeNumber": "E12345"6}
List applications (Beta)Copy
Returns a list of applications.
Sample Input
1{2"select": [3"displayName",4"appId",5"signInAudience"6],7"filter": [8{9"name": "displayName",10"value": "Marketing App"11}12],13"condition": "and",14"order_by": "displayName",15"sort_order": "asc",16"limit": 517}
Sample Output
1{2"@odata.context": "https://graph.microsoft.com/beta/$metadata#applications(displayName,appId,signInAudience)",3"@odata.nextLink": "https://graph.microsoft.com/beta/applications?$select=displayName,appId,signInAudience&$filter=displayName eq 'Marketing App'&$orderby=displayName&$top=5&$skiptoken=X'12345678'",4"value": [5{6"@odata.context": "https://graph.microsoft.com/beta/$metadata#applications/$entity",7"id": "00000000-0000-0000-0000-000000000001",8"displayName": "Marketing App",9"appId": "11111111-1111-1111-1111-111111111111",10"signInAudience": "AzureADMyOrg"11},12{13"@odata.context": "https://graph.microsoft.com/beta/$metadata#applications/$entity",14"id": "00000000-0000-0000-0000-000000000002",15"displayName": "Marketing App - Dev",16"appId": "22222222-2222-2222-2222-222222222222",17"signInAudience": "AzureADMultipleOrgs"18},19{20"@odata.context": "https://graph.microsoft.com/beta/$metadata#applications/$entity",21"id": "00000000-0000-0000-0000-000000000003",22"displayName": "Marketing App - Test",23"appId": "33333333-3333-3333-3333-333333333333",24"signInAudience": "AzureADandPersonalMicrosoftAccount"25}26]27}
List group membersCopy
Returns a list of group members
Sample Input
1{2"group_id": "12345678-1234-1234-1234-123456789012",3"select": [4"displayName",5"mail",6"userPrincipalName"7],8"filter": [9{10"name": "jobTitle",11"value": "Software Engineer"12}13],14"condition": "and",15"order_by": "displayName",16"sort_order": "asc",17"limit": 518}
Sample Output
1{2"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users(displayName,mail,userPrincipalName)",3"@odata.nextLink": "https://graph.microsoft.com/v1.0/groups/12345678-1234-1234-1234-123456789012/members?$skiptoken=X%274453707402000100000035536572766963652E437265617465644174203E20323032322D30352D30315430303A30303A30305A20414E442053657276696365 2E437265617465644174203C3D20323032322D30352D33315430303A30303A30305A%27",4"value": [5{6"displayName": "Alice Johnson",7"mail": "alice.johnson@example.com",8"userPrincipalName": "alice.johnson@example.com"9},10{11"displayName": "Bob Smith",12"mail": "bob.smith@example.com",13"userPrincipalName": "bob.smith@example.com"14},15{16"displayName": "Charlie Brown",17"mail": "charlie.brown@example.com",18"userPrincipalName": "charlie.brown@example.com"19},20{21"displayName": "Diana Prince",22"mail": "diana.prince@example.com",23"userPrincipalName": "diana.prince@example.com"24},25{26"displayName": "Ethan Hunt",27"mail": "ethan.hunt@example.com",28"userPrincipalName": "ethan.hunt@example.com"29}30]31}
List groupsCopy
Returns a list of groups
Sample Input
1{2"select": [3"displayName",4"mail",5"securityEnabled"6],7"filter": [8{9"name": "mailEnabled",10"value": true11},12{13"name": "displayName",14"value": "Marketing"15}16],17"condition": "and",18"order_by": "displayName",19"sort_order": "asc",20"limit": 521}
Sample Output
1{2"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#groups(displayName,mail,securityEnabled)",3"@odata.nextLink": "https://graph.microsoft.com/v1.0/groups?$skiptoken=X'12345678'",4"value": [5{6"displayName": "Marketing Team",7"mail": "marketing@contoso.com",8"securityEnabled": false9},10{11"displayName": "Marketing Analytics",12"mail": "marketinganalytics@contoso.com",13"securityEnabled": true14},15{16"displayName": "Marketing Communications",17"mail": "marcomm@contoso.com",18"securityEnabled": false19},20{21"displayName": "Marketing Events",22"mail": "events@contoso.com",23"securityEnabled": false24},25{26"displayName": "Marketing Strategy",27"mail": "strategy@contoso.com",28"securityEnabled": true29}30]31}
List usersCopy
Returns a list of users.
Sample Input
1{2"select": [3"displayName",4"mail",5"jobTitle"6],7"filter": [8{9"name": "jobTitle",10"value": "Software Engineer"11}12],13"condition": "and",14"order_by": "displayName",15"sort_order": "asc",16"limit": 517}
Sample Output
1{2"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users(displayName,mail,jobTitle)",3"@odata.nextLink": "https://graph.microsoft.com/v1.0/users?$select=displayName,mail,jobTitle&$filter=jobTitle eq 'Software Engineer'&$orderby=displayName&$top=5&$skiptoken=X%274453707402000100000035536572766963652E437265617465436F6E74616374000000000000000000%27",4"value": [5{6"displayName": "Alice Johnson",7"mail": "alice.johnson@example.com",8"jobTitle": "Software Engineer"9},10{11"displayName": "Bob Smith",12"mail": "bob.smith@example.com",13"jobTitle": "Software Engineer"14},15{16"displayName": "Charlie Brown",17"mail": "charlie.brown@example.com",18"jobTitle": "Software Engineer"19},20{21"displayName": "Diana Lee",22"mail": "diana.lee@example.com",23"jobTitle": "Software Engineer"24},25{26"displayName": "Ethan Davis",27"mail": "ethan.davis@example.com",28"jobTitle": "Software Engineer"29}30]31}
Raw HTTP request (advanced)Copy
Perform a raw HTTP request with some pre-configuration and processing by the connector, such as authentication.
Sample Input
1{2"method": "GET",3"url": {4"endpoint": "/users"5},6"headers": [7{8"key": "Accept",9"value": "application/json"10}11],12"query_parameters": [13{14"key": "filter",15"value": "displayName eq 'John Doe'"16}17],18"body": {19"none": null20},21"include_raw_body": false,22"parse_response": "true"23}
Sample Output
1{2"response": {3"status_code": 200,4"headers": {5"Content-Type": "application/json",6"Cache-Control": "no-cache"7},8"body": {9"value": [10{11"id": "12345678-1234-1234-1234-123456789012",12"displayName": "John Doe",13"userPrincipalName": "johndoe@example.com",14"mail": "johndoe@example.com",15"jobTitle": "Software Engineer",16"department": "IT"17}18]19}20}21}
Update userCopy
Updates a user. Only the properties that you specify are changed.
Sample Input
1{2"user_id": "12345678-1234-1234-1234-123456789012",3"display_name": "John Doe",4"mail_nickname": "johnd",5"user_principal_name": "johnd@contoso.com",6"account_enabled": true,7"city": "New York",8"country": "United States",9"department": "Sales",10"given_name": "John",11"surname": "Doe",12"job_title": "Sales Manager",13"office_location": "NYC-123",14"postal_code": "10001",15"preferred_language": "en-US",16"state": "NY",17"street_address": "123 Main St",18"mobile_phone": "+1 (555) 123-4567",19"usage_location": "US",20"custom_attributes": [21{22"name": "extension_366cf3460d404b83bfab6c4919066267_customAddr",23"value": "456 Secondary St"24}25]26}
Sample Output
1{2"success": true3}
DDL operationsCopy
List application attributes (DDL)Copy
Note that DDL operations can only be called directly by Connectors API, or when using CustomJS in the Embedded solution editor for e.g. DDL-dependent data mapping
Sample Input
1{}
Sample Output
1[2{3"name": "displayName",4"type": "Edm.String",5"nullable": false,6"maxLength": 2567},8{9"name": "appId",10"type": "Edm.String",11"nullable": false12},13{14"name": "signInAudience",15"type": "Edm.String",16"nullable": false17},18{19"name": "createdDateTime",20"type": "Edm.DateTimeOffset",21"nullable": false22},23{24"name": "description",25"type": "Edm.String",26"nullable": true,27"maxLength": 102428},29{30"name": "identifierUris",31"type": "Collection(Edm.String)",32"nullable": true33},34{35"name": "publisherDomain",36"type": "Edm.String",37"nullable": true38},39{40"name": "tags",41"type": "Collection(Edm.String)",42"nullable": true43}44]
List custom attributes (DDL)Copy
Note that DDL operations can only be called directly by Connectors API, or when using CustomJS in the Embedded solution editor for e.g. DDL-dependent data mapping
Sample Input
1{}
Sample Output
1[2{3"id": "extension_a3b1b1b1a1a1_customAttribute1",4"name": "customAttribute1",5"dataType": "String",6"targetObjects": [7"User"8]9},10{11"id": "extension_a3b1b1b1a1a1_customAttribute2",12"name": "customAttribute2",13"dataType": "Integer",14"targetObjects": [15"User",16"Group"17]18},19{20"id": "extension_a3b1b1b1a1a1_customAttribute3",21"name": "customAttribute3",22"dataType": "Boolean",23"targetObjects": [24"User"25]26}27]
List group attributes (DDL)Copy
Note that DDL operations can only be called directly by Connectors API, or when using CustomJS in the Embedded solution editor for e.g. DDL-dependent data mapping
Sample Input
1{}
Sample Output
1[2{3"name": "id",4"type": "Edm.String",5"description": "The unique identifier for the group"6},7{8"name": "displayName",9"type": "Edm.String",10"description": "The display name for the group"11},12{13"name": "description",14"type": "Edm.String",15"description": "An optional description for the group"16},17{18"name": "mailNickname",19"type": "Edm.String",20"description": "The mail alias for the group"21},22{23"name": "mailEnabled",24"type": "Edm.Boolean",25"description": "Specifies whether the group is mail-enabled"26},27{28"name": "securityEnabled",29"type": "Edm.Boolean",30"description": "Specifies whether the group is a security group"31},32{33"name": "createdDateTime",34"type": "Edm.DateTimeOffset",35"description": "The date and time when the group was created"36},37{38"name": "visibility",39"type": "Edm.String",40"description": "Specifies the visibility of the group"41}42]
List groups (DDL)Copy
Note that DDL operations can only be called directly by Connectors API, or when using CustomJS in the Embedded solution editor for e.g. DDL-dependent data mapping
Sample Input
1{}
Sample Output
1[2{3"id": "00000000-0000-0000-0000-000000000000",4"deletedDateTime": null,5"classification": null,6"createdDateTime": "2023-05-15T10:30:00Z",7"creationOptions": [],8"description": "A group for marketing team members",9"displayName": "Marketing Team",10"expirationDateTime": null,11"groupTypes": [12"Unified"13],14"isAssignableToRole": false,15"mail": "marketing@contoso.com",16"mailEnabled": true,17"mailNickname": "marketing",18"membershipRule": null,19"membershipRuleProcessingState": null,20"onPremisesDomainName": null,21"onPremisesLastSyncDateTime": null,22"onPremisesNetBiosName": null,23"onPremisesSamAccountName": null,24"onPremisesSecurityIdentifier": null,25"onPremisesSyncEnabled": null,26"preferredDataLocation": null,27"preferredLanguage": null,28"proxyAddresses": [29"SMTP:marketing@contoso.com"30],31"renewedDateTime": "2023-05-15T10:30:00Z",32"resourceBehaviorOptions": [],33"resourceProvisioningOptions": [],34"securityEnabled": false,35"securityIdentifier": "S-1-12-1-1234567890-123456789-1234567890-1234567",36"theme": null,37"visibility": "Public",38"onPremisesProvisioningErrors": []39},40{41"id": "11111111-1111-1111-1111-111111111111",42"deletedDateTime": null,43"classification": "Confidential",44"createdDateTime": "2023-05-10T14:45:00Z",45"creationOptions": [],46"description": "A group for IT department staff",47"displayName": "IT Department",48"expirationDateTime": null,49"groupTypes": [50"Unified"51],52"isAssignableToRole": true,53"mail": "it@contoso.com",54"mailEnabled": true,55"mailNickname": "itdept",56"membershipRule": null,57"membershipRuleProcessingState": null,58"onPremisesDomainName": null,59"onPremisesLastSyncDateTime": null,60"onPremisesNetBiosName": null,61"onPremisesSamAccountName": null,62"onPremisesSecurityIdentifier": null,63"onPremisesSyncEnabled": null,64"preferredDataLocation": null,65"preferredLanguage": "en-US",66"proxyAddresses": [67"SMTP:it@contoso.com"68],69"renewedDateTime": "2023-05-10T14:45:00Z",70"resourceBehaviorOptions": [],71"resourceProvisioningOptions": [],72"securityEnabled": true,73"securityIdentifier": "S-1-12-1-2345678901-234567890-2345678901-2345678",74"theme": null,75"visibility": "Private",76"onPremisesProvisioningErrors": []77}78]
List user attributes (DDL)Copy
Note that DDL operations can only be called directly by Connectors API, or when using CustomJS in the Embedded solution editor for e.g. DDL-dependent data mapping
Sample Input
1{}
Sample Output
1[2{3"name": "id",4"type": "Edm.String",5"nullable": false,6"description": "The unique identifier for the user"7},8{9"name": "displayName",10"type": "Edm.String",11"nullable": true,12"description": "The name displayed in the address book for the user"13},14{15"name": "givenName",16"type": "Edm.String",17"nullable": true,18"description": "The given name (first name) of the user"19},20{21"name": "surname",22"type": "Edm.String",23"nullable": true,24"description": "The surname (last name) of the user"25},26{27"name": "userPrincipalName",28"type": "Edm.String",29"nullable": false,30"description": "The user principal name (UPN) of the user"31},32{33"name": "mail",34"type": "Edm.String",35"nullable": true,36"description": "The SMTP address for the user"37},38{39"name": "jobTitle",40"type": "Edm.String",41"nullable": true,42"description": "The user's job title"43},44{45"name": "department",46"type": "Edm.String",47"nullable": true,48"description": "The name for the department in which the user works"49},50{51"name": "accountEnabled",52"type": "Edm.Boolean",53"nullable": false,54"description": "true if the account is enabled; otherwise, false"55},56{57"name": "createdDateTime",58"type": "Edm.DateTimeOffset",59"nullable": false,60"description": "The date and time the user was created"61}62]