// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Beta.TrustFramework.KeySets.Item.GenerateKey;
var requestBody = new GenerateKeyPostRequestBody
{
Use = "sig",
Kty = "RSA",
Nbf = 1508969811L,
Exp = 1508969811L,
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.TrustFramework.KeySets["{trustFrameworkKeySet-id}"].GenerateKey.PostAsync(requestBody);
// Code snippets are only available for the latest major version. Current major version is $v0.*
// Dependencies
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-beta-sdk-go"
graphtrustframework "github.com/microsoftgraph/msgraph-beta-sdk-go/trustframework"
//other-imports
)
requestBody := graphtrustframework.NewGenerateKeyPostRequestBody()
use := "sig"
requestBody.SetUse(&use)
kty := "RSA"
requestBody.SetKty(&kty)
nbf := int64(1508969811)
requestBody.SetNbf(&nbf)
exp := int64(1508969811)
requestBody.SetExp(&exp)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
generateKey, err := graphClient.TrustFramework().KeySets().ByTrustFrameworkKeySetId("trustFrameworkKeySet-id").GenerateKey().Post(context.Background(), requestBody, nil)
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
com.microsoft.graph.beta.trustframework.keysets.item.generatekey.GenerateKeyPostRequestBody generateKeyPostRequestBody = new com.microsoft.graph.beta.trustframework.keysets.item.generatekey.GenerateKeyPostRequestBody();
generateKeyPostRequestBody.setUse("sig");
generateKeyPostRequestBody.setKty("RSA");
generateKeyPostRequestBody.setNbf(1508969811L);
generateKeyPostRequestBody.setExp(1508969811L);
var result = graphClient.trustFramework().keySets().byTrustFrameworkKeySetId("{trustFrameworkKeySet-id}").generateKey().post(generateKeyPostRequestBody);
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph_beta import GraphServiceClient
from msgraph_beta.generated.trustframework.keysets.item.generate_key.generate_key_post_request_body import GenerateKeyPostRequestBody
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = GenerateKeyPostRequestBody(
use = "sig",
kty = "RSA",
nbf = 1508969811,
exp = 1508969811,
)
result = await graph_client.trust_framework.key_sets.by_trust_framework_key_set_id('trustFrameworkKeySet-id').generate_key.post(request_body)