Uma das seguintes permissões é obrigatória para chamar esta API. Para saber mais, incluindo como escolher permissões, confira Permissões.
Forneça um objeto JSON com os seguintes parâmetros no corpo da solicitação.
Este é um exemplo de solicitação.
POST https://graph.microsoft.com/beta/servicePrincipals/{id}/synchronization/jobs/{id}/schema/parseExpression
Content-type: application/json
{
"expression":"Replace([preferredLanguage], \"-\", , , \"_\", , )",
"targetAttributeDefinition":null,
"testInputObject": {
definition: null,
properties:[
{ key: "objectId", value : "66E4A8CC-1B7B-435E-95F8-F06CEA133828" },
{ key: "IsSoftDeleted", value: "false"},
{ key: "accountEnabled", value: "true"},
{ key: "streetAddress", value: "1 Redmond Way"},
{ key: "city", value: "Redmond"},
{ key: "state", value: "WA"},
{ key: "postalCode", value: "98052"},
{ key: "country", value: "USA"},
{ key: "department", value: "Sales"},
{ key: "displayName", value: "John Smith"},
{ key: "extensionAttribute1", value: "Sample 1"},
{ key: "extensionAttribute2", value: "Sample 2"},
{ key: "extensionAttribute3", value: "Sample 3"},
{ key: "extensionAttribute4", value: "Sample 4"},
{ key: "extensionAttribute5", value: "Sample 5"},
{ key: "extensionAttribute6", value: "Sample 6"},
{ key: "extensionAttribute7", value: "Sample 1"},
{ key: "extensionAttribute8", value: "Sample 1"},
{ key: "extensionAttribute9", value: "Sample 1"},
{ key: "extensionAttribute10", value: "Sample 1"},
{ key: "extensionAttribute11", value: "Sample 1"},
{ key: "extensionAttribute12", value: "Sample 1"},
{ key: "extensionAttribute13", value: "Sample 1"},
{ key: "extensionAttribute14", value: "Sample 1"},
{ key: "extensionAttribute15", value: "Sample 1"},
{ key: "givenName", value: "John"},
{ key: "jobTitle", value: "Finance manager"},
{ key: "mail", value: "johns@contoso.com"},
{ key: "mailNickname", value: "johns"},
{ key: "manager", value: "maxs@contoso.com"},
{ key: "mobile", value: "425-555-0010"},
{ key: "onPremisesSecurityIdentifier", value: "66E4A8CC-1B7B-435E-95F8-F06CEA133828"},
{ key: "passwordProfile.password", value: ""},
{ key: "physicalDeliveryOfficeName", value: "Main Office"},
{ key: "preferredLanguage", value: "EN-US"},
{ key: "proxyAddresses", value: ""},
{ key: "surname", value: "Smith"},
{ key: "telephoneNumber", value: "425-555-0011"},
{ key: "userPrincipalName", value: "johns@contoso.com"},
{ key: "appRoleAssignments", "value@odata.type":"#Collection(String)", value: ["Default Assignment"] }
]
}
}
GraphServiceClient graphClient = new GraphServiceClient( authProvider );
var expression = "Replace([preferredLanguage], \"-\", , , \"_\", , )";
AttributeDefinition targetAttributeDefinition = null;
var testInputObject = new ExpressionInputObject
{
Definition = null,
Properties = new List<StringKeyObjectValuePair>()
{
new StringKeyObjectValuePair
{
Key = "objectId",
AdditionalData = new Dictionary<string, object>()
{
{"value", "66E4A8CC-1B7B-435E-95F8-F06CEA133828"}
}
},
new StringKeyObjectValuePair
{
Key = "IsSoftDeleted",
AdditionalData = new Dictionary<string, object>()
{
{"value", "false"}
}
},
new StringKeyObjectValuePair
{
Key = "accountEnabled",
AdditionalData = new Dictionary<string, object>()
{
{"value", "true"}
}
},
new StringKeyObjectValuePair
{
Key = "streetAddress",
AdditionalData = new Dictionary<string, object>()
{
{"value", "1 Redmond Way"}
}
},
new StringKeyObjectValuePair
{
Key = "city",
AdditionalData = new Dictionary<string, object>()
{
{"value", "Redmond"}
}
},
new StringKeyObjectValuePair
{
Key = "state",
AdditionalData = new Dictionary<string, object>()
{
{"value", "WA"}
}
},
new StringKeyObjectValuePair
{
Key = "postalCode",
AdditionalData = new Dictionary<string, object>()
{
{"value", "98052"}
}
},
new StringKeyObjectValuePair
{
Key = "country",
AdditionalData = new Dictionary<string, object>()
{
{"value", "USA"}
}
},
new StringKeyObjectValuePair
{
Key = "department",
AdditionalData = new Dictionary<string, object>()
{
{"value", "Sales"}
}
},
new StringKeyObjectValuePair
{
Key = "displayName",
AdditionalData = new Dictionary<string, object>()
{
{"value", "John Smith"}
}
},
new StringKeyObjectValuePair
{
Key = "extensionAttribute1",
AdditionalData = new Dictionary<string, object>()
{
{"value", "Sample 1"}
}
},
new StringKeyObjectValuePair
{
Key = "extensionAttribute2",
AdditionalData = new Dictionary<string, object>()
{
{"value", "Sample 2"}
}
},
new StringKeyObjectValuePair
{
Key = "extensionAttribute3",
AdditionalData = new Dictionary<string, object>()
{
{"value", "Sample 3"}
}
},
new StringKeyObjectValuePair
{
Key = "extensionAttribute4",
AdditionalData = new Dictionary<string, object>()
{
{"value", "Sample 4"}
}
},
new StringKeyObjectValuePair
{
Key = "extensionAttribute5",
AdditionalData = new Dictionary<string, object>()
{
{"value", "Sample 5"}
}
},
new StringKeyObjectValuePair
{
Key = "extensionAttribute6",
AdditionalData = new Dictionary<string, object>()
{
{"value", "Sample 6"}
}
},
new StringKeyObjectValuePair
{
Key = "extensionAttribute7",
AdditionalData = new Dictionary<string, object>()
{
{"value", "Sample 1"}
}
},
new StringKeyObjectValuePair
{
Key = "extensionAttribute8",
AdditionalData = new Dictionary<string, object>()
{
{"value", "Sample 1"}
}
},
new StringKeyObjectValuePair
{
Key = "extensionAttribute9",
AdditionalData = new Dictionary<string, object>()
{
{"value", "Sample 1"}
}
},
new StringKeyObjectValuePair
{
Key = "extensionAttribute10",
AdditionalData = new Dictionary<string, object>()
{
{"value", "Sample 1"}
}
},
new StringKeyObjectValuePair
{
Key = "extensionAttribute11",
AdditionalData = new Dictionary<string, object>()
{
{"value", "Sample 1"}
}
},
new StringKeyObjectValuePair
{
Key = "extensionAttribute12",
AdditionalData = new Dictionary<string, object>()
{
{"value", "Sample 1"}
}
},
new StringKeyObjectValuePair
{
Key = "extensionAttribute13",
AdditionalData = new Dictionary<string, object>()
{
{"value", "Sample 1"}
}
},
new StringKeyObjectValuePair
{
Key = "extensionAttribute14",
AdditionalData = new Dictionary<string, object>()
{
{"value", "Sample 1"}
}
},
new StringKeyObjectValuePair
{
Key = "extensionAttribute15",
AdditionalData = new Dictionary<string, object>()
{
{"value", "Sample 1"}
}
},
new StringKeyObjectValuePair
{
Key = "givenName",
AdditionalData = new Dictionary<string, object>()
{
{"value", "John"}
}
},
new StringKeyObjectValuePair
{
Key = "jobTitle",
AdditionalData = new Dictionary<string, object>()
{
{"value", "Finance manager"}
}
},
new StringKeyObjectValuePair
{
Key = "mail",
AdditionalData = new Dictionary<string, object>()
{
{"value", "johns@contoso.com"}
}
},
new StringKeyObjectValuePair
{
Key = "mailNickname",
AdditionalData = new Dictionary<string, object>()
{
{"value", "johns"}
}
},
new StringKeyObjectValuePair
{
Key = "manager",
AdditionalData = new Dictionary<string, object>()
{
{"value", "maxs@contoso.com"}
}
},
new StringKeyObjectValuePair
{
Key = "mobile",
AdditionalData = new Dictionary<string, object>()
{
{"value", "425-555-0010"}
}
},
new StringKeyObjectValuePair
{
Key = "onPremisesSecurityIdentifier",
AdditionalData = new Dictionary<string, object>()
{
{"value", "66E4A8CC-1B7B-435E-95F8-F06CEA133828"}
}
},
new StringKeyObjectValuePair
{
Key = "passwordProfile.password",
AdditionalData = new Dictionary<string, object>()
{
{"value", ""}
}
},
new StringKeyObjectValuePair
{
Key = "physicalDeliveryOfficeName",
AdditionalData = new Dictionary<string, object>()
{
{"value", "Main Office"}
}
},
new StringKeyObjectValuePair
{
Key = "preferredLanguage",
AdditionalData = new Dictionary<string, object>()
{
{"value", "EN-US"}
}
},
new StringKeyObjectValuePair
{
Key = "proxyAddresses",
AdditionalData = new Dictionary<string, object>()
{
{"value", ""}
}
},
new StringKeyObjectValuePair
{
Key = "surname",
AdditionalData = new Dictionary<string, object>()
{
{"value", "Smith"}
}
},
new StringKeyObjectValuePair
{
Key = "telephoneNumber",
AdditionalData = new Dictionary<string, object>()
{
{"value", "425-555-0011"}
}
},
new StringKeyObjectValuePair
{
Key = "userPrincipalName",
AdditionalData = new Dictionary<string, object>()
{
{"value", "johns@contoso.com"}
}
},
new StringKeyObjectValuePair
{
Key = "appRoleAssignments",
AdditionalData = new Dictionary<string, object>()
{
{"value@odata.type", "#Collection(String)"},
{"value", "[\"Default Assignment\"]"}
}
}
}
};
await graphClient.ServicePrincipals["{servicePrincipal-id}"].Synchronization.Jobs["{synchronizationJob-id}"].Schema
.ParseExpression(expression,testInputObject,targetAttributeDefinition)
.Request()
.PostAsync();
Importante
Os SDKs do Microsoft Graph usam a versão v1.0 da API por padrão e não dão suporte a todos os tipos, propriedades e APIs disponíveis na versão beta. Para obter detalhes sobre como acessar a API beta com o SDK, consulte Usar os SDKs do Microsoft Graph com a API beta.
Para obter detalhes sobre como adicionar o SDK ao seu projeto e criar uma instância authProvider , consulte a documentação do SDK.
const options = {
authProvider,
};
const client = Client.init(options);
const parseExpressionResponse = {
expression: 'Replace([preferredLanguage], \"-\", , , \"_\", , )',
targetAttributeDefinition: null,
testInputObject: {
definition: null,
properties:[
{ key: 'objectId', value : '66E4A8CC-1B7B-435E-95F8-F06CEA133828' },
{ key: 'IsSoftDeleted', value: 'false'},
{ key: 'accountEnabled', value: 'true'},
{ key: 'streetAddress', value: '1 Redmond Way'},
{ key: 'city', value: 'Redmond'},
{ key: 'state', value: 'WA'},
{ key: 'postalCode', value: '98052'},
{ key: 'country', value: 'USA'},
{ key: 'department', value: 'Sales'},
{ key: 'displayName', value: 'John Smith'},
{ key: 'extensionAttribute1', value: 'Sample 1'},
{ key: 'extensionAttribute2', value: 'Sample 2'},
{ key: 'extensionAttribute3', value: 'Sample 3'},
{ key: 'extensionAttribute4', value: 'Sample 4'},
{ key: 'extensionAttribute5', value: 'Sample 5'},
{ key: 'extensionAttribute6', value: 'Sample 6'},
{ key: 'extensionAttribute7', value: 'Sample 1'},
{ key: 'extensionAttribute8', value: 'Sample 1'},
{ key: 'extensionAttribute9', value: 'Sample 1'},
{ key: 'extensionAttribute10', value: 'Sample 1'},
{ key: 'extensionAttribute11', value: 'Sample 1'},
{ key: 'extensionAttribute12', value: 'Sample 1'},
{ key: 'extensionAttribute13', value: 'Sample 1'},
{ key: 'extensionAttribute14', value: 'Sample 1'},
{ key: 'extensionAttribute15', value: 'Sample 1'},
{ key: 'givenName', value: 'John'},
{ key: 'jobTitle', value: 'Finance manager'},
{ key: 'mail', value: 'johns@contoso.com'},
{ key: 'mailNickname', value: 'johns'},
{ key: 'manager', value: 'maxs@contoso.com'},
{ key: 'mobile', value: '425-555-0010'},
{ key: 'onPremisesSecurityIdentifier', value: '66E4A8CC-1B7B-435E-95F8-F06CEA133828'},
{ key: 'passwordProfile.password', value: ''},
{ key: 'physicalDeliveryOfficeName', value: 'Main Office'},
{ key: 'preferredLanguage', value: 'EN-US'},
{ key: 'proxyAddresses', value: ''},
{ key: 'surname', value: 'Smith'},
{ key: 'telephoneNumber', value: '425-555-0011'},
{ key: 'userPrincipalName', value: 'johns@contoso.com'},
{ key: 'appRoleAssignments', 'value@odata.type':'#Collection(String)', value: ['Default Assignment'] }
]
}
};
await client.api('/servicePrincipals/{id}/synchronization/jobs/{id}/schema/parseExpression')
.version('beta')
.post(parseExpressionResponse);
Importante
Os SDKs do Microsoft Graph usam a versão v1.0 da API por padrão e não dão suporte a todos os tipos, propriedades e APIs disponíveis na versão beta. Para obter detalhes sobre como acessar a API beta com o SDK, consulte Usar os SDKs do Microsoft Graph com a API beta.
Para obter detalhes sobre como adicionar o SDK ao seu projeto e criar uma instância authProvider , consulte a documentação do SDK.
MSHTTPClient *httpClient = [MSClientFactory createHTTPClientWithAuthenticationProvider:authenticationProvider];
NSString *MSGraphBaseURL = @"https://graph.microsoft.com/beta/";
NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/servicePrincipals/{id}/synchronization/jobs/{id}/schema/parseExpression"]]];
[urlRequest setHTTPMethod:@"POST"];
[urlRequest setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
NSMutableDictionary *payloadDictionary = [[NSMutableDictionary alloc] init];
NSString *expression = @"Replace([preferredLanguage], "-", , , "_", , )";
payloadDictionary[@"expression"] = expression;
payloadDictionary[@"targetAttributeDefinition"] = targetAttributeDefinition;
MSGraphExpressionInputObject *testInputObject = [[MSGraphExpressionInputObject alloc] init];
[testInputObject setDefinition: null];
NSMutableArray *propertiesList = [[NSMutableArray alloc] init];
MSGraphStringKeyObjectValuePair *properties = [[MSGraphStringKeyObjectValuePair alloc] init];
[properties setKey:@"objectId"];
[properties setValue:@"66E4A8CC-1B7B-435E-95F8-F06CEA133828"];
[propertiesList addObject: properties];
MSGraphStringKeyObjectValuePair *properties = [[MSGraphStringKeyObjectValuePair alloc] init];
[properties setKey:@"IsSoftDeleted"];
[properties setValue:@"false"];
[propertiesList addObject: properties];
MSGraphStringKeyObjectValuePair *properties = [[MSGraphStringKeyObjectValuePair alloc] init];
[properties setKey:@"accountEnabled"];
[properties setValue:@"true"];
[propertiesList addObject: properties];
MSGraphStringKeyObjectValuePair *properties = [[MSGraphStringKeyObjectValuePair alloc] init];
[properties setKey:@"streetAddress"];
[properties setValue:@"1 Redmond Way"];
[propertiesList addObject: properties];
MSGraphStringKeyObjectValuePair *properties = [[MSGraphStringKeyObjectValuePair alloc] init];
[properties setKey:@"city"];
[properties setValue:@"Redmond"];
[propertiesList addObject: properties];
MSGraphStringKeyObjectValuePair *properties = [[MSGraphStringKeyObjectValuePair alloc] init];
[properties setKey:@"state"];
[properties setValue:@"WA"];
[propertiesList addObject: properties];
MSGraphStringKeyObjectValuePair *properties = [[MSGraphStringKeyObjectValuePair alloc] init];
[properties setKey:@"postalCode"];
[properties setValue:@"98052"];
[propertiesList addObject: properties];
MSGraphStringKeyObjectValuePair *properties = [[MSGraphStringKeyObjectValuePair alloc] init];
[properties setKey:@"country"];
[properties setValue:@"USA"];
[propertiesList addObject: properties];
MSGraphStringKeyObjectValuePair *properties = [[MSGraphStringKeyObjectValuePair alloc] init];
[properties setKey:@"department"];
[properties setValue:@"Sales"];
[propertiesList addObject: properties];
MSGraphStringKeyObjectValuePair *properties = [[MSGraphStringKeyObjectValuePair alloc] init];
[properties setKey:@"displayName"];
[properties setValue:@"John Smith"];
[propertiesList addObject: properties];
MSGraphStringKeyObjectValuePair *properties = [[MSGraphStringKeyObjectValuePair alloc] init];
[properties setKey:@"extensionAttribute1"];
[properties setValue:@"Sample 1"];
[propertiesList addObject: properties];
MSGraphStringKeyObjectValuePair *properties = [[MSGraphStringKeyObjectValuePair alloc] init];
[properties setKey:@"extensionAttribute2"];
[properties setValue:@"Sample 2"];
[propertiesList addObject: properties];
MSGraphStringKeyObjectValuePair *properties = [[MSGraphStringKeyObjectValuePair alloc] init];
[properties setKey:@"extensionAttribute3"];
[properties setValue:@"Sample 3"];
[propertiesList addObject: properties];
MSGraphStringKeyObjectValuePair *properties = [[MSGraphStringKeyObjectValuePair alloc] init];
[properties setKey:@"extensionAttribute4"];
[properties setValue:@"Sample 4"];
[propertiesList addObject: properties];
MSGraphStringKeyObjectValuePair *properties = [[MSGraphStringKeyObjectValuePair alloc] init];
[properties setKey:@"extensionAttribute5"];
[properties setValue:@"Sample 5"];
[propertiesList addObject: properties];
MSGraphStringKeyObjectValuePair *properties = [[MSGraphStringKeyObjectValuePair alloc] init];
[properties setKey:@"extensionAttribute6"];
[properties setValue:@"Sample 6"];
[propertiesList addObject: properties];
MSGraphStringKeyObjectValuePair *properties = [[MSGraphStringKeyObjectValuePair alloc] init];
[properties setKey:@"extensionAttribute7"];
[properties setValue:@"Sample 1"];
[propertiesList addObject: properties];
MSGraphStringKeyObjectValuePair *properties = [[MSGraphStringKeyObjectValuePair alloc] init];
[properties setKey:@"extensionAttribute8"];
[properties setValue:@"Sample 1"];
[propertiesList addObject: properties];
MSGraphStringKeyObjectValuePair *properties = [[MSGraphStringKeyObjectValuePair alloc] init];
[properties setKey:@"extensionAttribute9"];
[properties setValue:@"Sample 1"];
[propertiesList addObject: properties];
MSGraphStringKeyObjectValuePair *properties = [[MSGraphStringKeyObjectValuePair alloc] init];
[properties setKey:@"extensionAttribute10"];
[properties setValue:@"Sample 1"];
[propertiesList addObject: properties];
MSGraphStringKeyObjectValuePair *properties = [[MSGraphStringKeyObjectValuePair alloc] init];
[properties setKey:@"extensionAttribute11"];
[properties setValue:@"Sample 1"];
[propertiesList addObject: properties];
MSGraphStringKeyObjectValuePair *properties = [[MSGraphStringKeyObjectValuePair alloc] init];
[properties setKey:@"extensionAttribute12"];
[properties setValue:@"Sample 1"];
[propertiesList addObject: properties];
MSGraphStringKeyObjectValuePair *properties = [[MSGraphStringKeyObjectValuePair alloc] init];
[properties setKey:@"extensionAttribute13"];
[properties setValue:@"Sample 1"];
[propertiesList addObject: properties];
MSGraphStringKeyObjectValuePair *properties = [[MSGraphStringKeyObjectValuePair alloc] init];
[properties setKey:@"extensionAttribute14"];
[properties setValue:@"Sample 1"];
[propertiesList addObject: properties];
MSGraphStringKeyObjectValuePair *properties = [[MSGraphStringKeyObjectValuePair alloc] init];
[properties setKey:@"extensionAttribute15"];
[properties setValue:@"Sample 1"];
[propertiesList addObject: properties];
MSGraphStringKeyObjectValuePair *properties = [[MSGraphStringKeyObjectValuePair alloc] init];
[properties setKey:@"givenName"];
[properties setValue:@"John"];
[propertiesList addObject: properties];
MSGraphStringKeyObjectValuePair *properties = [[MSGraphStringKeyObjectValuePair alloc] init];
[properties setKey:@"jobTitle"];
[properties setValue:@"Finance manager"];
[propertiesList addObject: properties];
MSGraphStringKeyObjectValuePair *properties = [[MSGraphStringKeyObjectValuePair alloc] init];
[properties setKey:@"mail"];
[properties setValue:@"johns@contoso.com"];
[propertiesList addObject: properties];
MSGraphStringKeyObjectValuePair *properties = [[MSGraphStringKeyObjectValuePair alloc] init];
[properties setKey:@"mailNickname"];
[properties setValue:@"johns"];
[propertiesList addObject: properties];
MSGraphStringKeyObjectValuePair *properties = [[MSGraphStringKeyObjectValuePair alloc] init];
[properties setKey:@"manager"];
[properties setValue:@"maxs@contoso.com"];
[propertiesList addObject: properties];
MSGraphStringKeyObjectValuePair *properties = [[MSGraphStringKeyObjectValuePair alloc] init];
[properties setKey:@"mobile"];
[properties setValue:@"425-555-0010"];
[propertiesList addObject: properties];
MSGraphStringKeyObjectValuePair *properties = [[MSGraphStringKeyObjectValuePair alloc] init];
[properties setKey:@"onPremisesSecurityIdentifier"];
[properties setValue:@"66E4A8CC-1B7B-435E-95F8-F06CEA133828"];
[propertiesList addObject: properties];
MSGraphStringKeyObjectValuePair *properties = [[MSGraphStringKeyObjectValuePair alloc] init];
[properties setKey:@"passwordProfile.password"];
[properties setValue:@""];
[propertiesList addObject: properties];
MSGraphStringKeyObjectValuePair *properties = [[MSGraphStringKeyObjectValuePair alloc] init];
[properties setKey:@"physicalDeliveryOfficeName"];
[properties setValue:@"Main Office"];
[propertiesList addObject: properties];
MSGraphStringKeyObjectValuePair *properties = [[MSGraphStringKeyObjectValuePair alloc] init];
[properties setKey:@"preferredLanguage"];
[properties setValue:@"EN-US"];
[propertiesList addObject: properties];
MSGraphStringKeyObjectValuePair *properties = [[MSGraphStringKeyObjectValuePair alloc] init];
[properties setKey:@"proxyAddresses"];
[properties setValue:@""];
[propertiesList addObject: properties];
MSGraphStringKeyObjectValuePair *properties = [[MSGraphStringKeyObjectValuePair alloc] init];
[properties setKey:@"surname"];
[properties setValue:@"Smith"];
[propertiesList addObject: properties];
MSGraphStringKeyObjectValuePair *properties = [[MSGraphStringKeyObjectValuePair alloc] init];
[properties setKey:@"telephoneNumber"];
[properties setValue:@"425-555-0011"];
[propertiesList addObject: properties];
MSGraphStringKeyObjectValuePair *properties = [[MSGraphStringKeyObjectValuePair alloc] init];
[properties setKey:@"userPrincipalName"];
[properties setValue:@"johns@contoso.com"];
[propertiesList addObject: properties];
MSGraphStringKeyObjectValuePair *properties = [[MSGraphStringKeyObjectValuePair alloc] init];
[properties setKey:@"appRoleAssignments"];
NSMutableArray *valueList = [[NSMutableArray alloc] init];
[valueList addObject: @"Default Assignment"];
[properties setValue:valueList];
[propertiesList addObject: properties];
[testInputObject setProperties:propertiesList];
payloadDictionary[@"testInputObject"] = testInputObject;
NSData *data = [NSJSONSerialization dataWithJSONObject:payloadDictionary options:kNilOptions error:&error];
[urlRequest setHTTPBody:data];
MSURLSessionDataTask *meDataTask = [httpClient dataTaskWithRequest:urlRequest
completionHandler: ^(NSData *data, NSURLResponse *response, NSError *nserror) {
//Request Completed
}];
[meDataTask execute];
Importante
Os SDKs do Microsoft Graph usam a versão v1.0 da API por padrão e não dão suporte a todos os tipos, propriedades e APIs disponíveis na versão beta. Para obter detalhes sobre como acessar a API beta com o SDK, consulte Usar os SDKs do Microsoft Graph com a API beta.
Para obter detalhes sobre como adicionar o SDK ao seu projeto e criar uma instância authProvider , consulte a documentação do SDK.
//THE GO SDK IS IN PREVIEW. NON-PRODUCTION USE ONLY
graphClient := msgraphsdk.NewGraphServiceClient(requestAdapter)
servicePrincipalId := "servicePrincipal-id"
synchronizationJobId := "synchronizationJob-id"
result, err := graphClient.ServicePrincipalsById(&servicePrincipalId).Synchronization().JobsById(&synchronizationJobId).Schema().ParseExpression(servicePrincipal-id, synchronizationJob-id).Post()
Importante
Os SDKs do Microsoft Graph usam a versão v1.0 da API por padrão e não dão suporte a todos os tipos, propriedades e APIs disponíveis na versão beta. Para obter detalhes sobre como acessar a API beta com o SDK, consulte Usar os SDKs do Microsoft Graph com a API beta.
Para obter detalhes sobre como adicionar o SDK ao seu projeto e criar uma instância authProvider , consulte a documentação do SDK.
Este é um exemplo de resposta.