A tabela a seguir mostra as propriedades que são possíveis de definir ao criar um novo objeto itemPublication no perfil de um usuário.
Propriedade
Tipo
Descrição
allowedAudiences
Cadeia de caracteres
As audiências que são capazes de ver os valores contidos na entidade. Herdado do itemFacet. Os valores possíveis são: me, family, contacts, groupMembers, organization, federatedOrganizations, everyone, unknownFutureValue.
POST https://graph.microsoft.com/beta/me/profile/publications
Content-Type: application/json
{
"description": "One persons journey to the top of the branding management field.",
"displayName": "Got Brands? The story of Innocenty Popov and his journey to the top.",
"publishedDate": "Date",
"publisher": "International Association of Branding Management Publishing",
"thumbnailUrl": "https://iabm.io/sdhdfhsdhshsd.jpg",
"webUrl": "https://www.iabm.io"
}
GraphServiceClient graphClient = new GraphServiceClient( authProvider );
var itemPublication = new ItemPublication
{
Description = "One persons journey to the top of the branding management field.",
DisplayName = "Got Brands? The story of Innocenty Popov and his journey to the top.",
PublishedDate = new Date(1900,1,1),
Publisher = "International Association of Branding Management Publishing",
ThumbnailUrl = "https://iabm.io/sdhdfhsdhshsd.jpg",
WebUrl = "https://www.iabm.io"
};
await graphClient.Me.Profile.Publications
.Request()
.AddAsync(itemPublication);
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.
const options = {
authProvider,
};
const client = Client.init(options);
const itemPublication = {
description: 'One persons journey to the top of the branding management field.',
displayName: 'Got Brands? The story of Innocenty Popov and his journey to the top.',
publishedDate: 'Date',
publisher: 'International Association of Branding Management Publishing',
thumbnailUrl: 'https://iabm.io/sdhdfhsdhshsd.jpg',
webUrl: 'https://www.iabm.io'
};
await client.api('/me/profile/publications')
.version('beta')
.post(itemPublication);
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.
MSHTTPClient *httpClient = [MSClientFactory createHTTPClientWithAuthenticationProvider:authenticationProvider];
NSString *MSGraphBaseURL = @"https://graph.microsoft.com/beta/";
NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/me/profile/publications"]]];
[urlRequest setHTTPMethod:@"POST"];
[urlRequest setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
MSGraphItemPublication *itemPublication = [[MSGraphItemPublication alloc] init];
[itemPublication setDescription:@"One persons journey to the top of the branding management field."];
[itemPublication setDisplayName:@"Got Brands? The story of Innocenty Popov and his journey to the top."];
[itemPublication setPublishedDate:@"Date"];
[itemPublication setPublisher:@"International Association of Branding Management Publishing"];
[itemPublication setThumbnailUrl:@"https://iabm.io/sdhdfhsdhshsd.jpg"];
[itemPublication setWebUrl:@"https://www.iabm.io"];
NSError *error;
NSData *itemPublicationData = [itemPublication getSerializedDataWithError:&error];
[urlRequest setHTTPBody:itemPublicationData];
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.
GraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
ItemPublication itemPublication = new ItemPublication();
itemPublication.description = "One persons journey to the top of the branding management field.";
itemPublication.displayName = "Got Brands? The story of Innocenty Popov and his journey to the top.";
itemPublication.publishedDate = new DateOnly(1900,1,1);
itemPublication.publisher = "International Association of Branding Management Publishing";
itemPublication.thumbnailUrl = "https://iabm.io/sdhdfhsdhshsd.jpg";
itemPublication.webUrl = "https://www.iabm.io";
graphClient.me().profile().publications()
.buildRequest()
.post(itemPublication);
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.
//THE GO SDK IS IN PREVIEW. NON-PRODUCTION USE ONLY
graphClient := msgraphsdk.NewGraphServiceClient(requestAdapter)
requestBody := msgraphsdk.NewItemPublication()
description := "One persons journey to the top of the branding management field."
requestBody.SetDescription(&description)
displayName := "Got Brands? The story of Innocenty Popov and his journey to the top."
requestBody.SetDisplayName(&displayName)
publishedDate := "Date"
requestBody.SetPublishedDate(&publishedDate)
publisher := "International Association of Branding Management Publishing"
requestBody.SetPublisher(&publisher)
thumbnailUrl := "https://iabm.io/sdhdfhsdhshsd.jpg"
requestBody.SetThumbnailUrl(&thumbnailUrl)
webUrl := "https://www.iabm.io"
requestBody.SetWebUrl(&webUrl)
result, err := graphClient.Me().Profile().Publications().Post(requestBody)
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.
Import-Module Microsoft.Graph.People
$params = @{
Description = "One persons journey to the top of the branding management field."
DisplayName = "Got Brands? The story of Innocenty Popov and his journey to the top."
PublishedDate = "Date"
Publisher = "International Association of Branding Management Publishing"
ThumbnailUrl = "https://iabm.io/sdhdfhsdhshsd.jpg"
WebUrl = "https://www.iabm.io"
}
# A UPN can also be used as -UserId.
New-MgUserProfilePublication -UserId $userId -BodyParameter $params
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.