// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Models;
var requestBody = new TokenIssuancePolicy
{
Definition = new List<string>
{
"definition-value",
},
DisplayName = "displayName-value",
IsOrganizationDefault = true,
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.Policies.TokenIssuancePolicies.PostAsync(requestBody);
// Code snippets are only available for the latest major version. Current major version is $v1.*
// Dependencies
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-sdk-go"
graphmodels "github.com/microsoftgraph/msgraph-sdk-go/models"
//other-imports
)
requestBody := graphmodels.NewTokenIssuancePolicy()
definition := []string {
"definition-value",
}
requestBody.SetDefinition(definition)
displayName := "displayName-value"
requestBody.SetDisplayName(&displayName)
isOrganizationDefault := true
requestBody.SetIsOrganizationDefault(&isOrganizationDefault)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
tokenIssuancePolicies, err := graphClient.Policies().TokenIssuancePolicies().Post(context.Background(), requestBody, nil)
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
TokenIssuancePolicy tokenIssuancePolicy = new TokenIssuancePolicy();
LinkedList<String> definition = new LinkedList<String>();
definition.add("definition-value");
tokenIssuancePolicy.setDefinition(definition);
tokenIssuancePolicy.setDisplayName("displayName-value");
tokenIssuancePolicy.setIsOrganizationDefault(true);
TokenIssuancePolicy result = graphClient.policies().tokenIssuancePolicies().post(tokenIssuancePolicy);
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
from msgraph.generated.models.token_issuance_policy import TokenIssuancePolicy
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = TokenIssuancePolicy(
definition = [
"definition-value",
],
display_name = "displayName-value",
is_organization_default = True,
)
result = await graph_client.policies.token_issuance_policies.post(request_body)