ESC
Type to search...

TrustFrameworkKeySet.ReadWrite.All

Export JSON
Export CSV
Copy URL
Print
ApplicationDelegated Read/Write All Resources

Allows the app to read and write trust framework key set properties without a signed-in user.

Permission data: April 6, 2026 at 4:06 AM UTC
Delegated Access App-Only Access

Permission Details

Application Permission

Read and write trust framework key sets

Allows the app to read and write trust framework key set properties without a signed-in user.

Delegated Permission Admin consent required

Read and write trust framework key sets

Allows the app to read and write trust framework key set properties on behalf of the signed-in user.

Properties

Microsoft Graph beta exact-category-docs

Properties is shown from beta metadata because a stable v1.0 schema is not available for this resource mapping.

Property Type Description
id String Unique identifier of the trustframework keyset Inherited from entity.
keys trustFrameworkKey collection A collection of the keys.

JSON Representation

Microsoft Graph beta exact-category-docs

JSON representation is shown from beta metadata because a stable v1.0 schema is not available for this resource mapping.

JSON representation
{
  "@odata.type": "#microsoft.graph.trustFrameworkKeySet",
  "id": "String (identifier)",
  "keys": [
    {
      "@odata.type": "microsoft.graph.trustFrameworkKey"
    }
  ]
}

Relationships

Microsoft Graph beta exact-category-docs

Relationships is shown from beta metadata because a stable v1.0 schema is not available for this resource mapping.

Relationship Type Description
keysv2 trustFrameworkKeyv2 collection A collection of the keys.

Graph Methods

Delegated access App-only access
Exact Microsoft Learn match

Microsoft Graph v1.0 endpoints are mapped directly from refreshed Microsoft Learn permissions tables.

No API methods available for this version.

Exact Microsoft Learn match

Microsoft Graph beta endpoints are mapped directly from refreshed Microsoft Learn permissions tables.

Methods
GET /trustFramework/keySets
GET /trustFramework/keySets/{id}
GET /trustFramework/keySets/{id}/getActiveKey
GET /trustFramework/keySets/{trustFrameworkKeySetId}/keysv2/{trustFrameworkKeyv2Id}
POST /trustFramework/keySets
POST /trustFramework/keySets/{id}/generateKey
POST /trustFramework/keySets/{id}/uploadCertificate
POST /trustFramework/keySets/{id}/uploadPkcs12
POST /trustFramework/keySets/{id}/uploadSecret
PATCH /trustFramework/keySets/{trustFrameworkKeySetId}/keysv2/{trustFrameworkKeyv2Id}
PUT /trustFramework/keySets/{id}
DELETE /trustFramework/keySets/{id}
Exact Microsoft Learn PowerShell match

Microsoft Graph PowerShell v1.0 commands are mapped directly from refreshed Microsoft Learn PowerShell snippets.

No deterministic PowerShell command map is available for this permission.

Browse PowerShell docs
Exact Microsoft Learn PowerShell match

Microsoft Graph PowerShell beta commands are mapped directly from refreshed Microsoft Learn PowerShell snippets.

Commands
Get-MgBetaTrustFrameworkKeySet /trustFramework/keySets
List keySets
Get-MgBetaTrustFrameworkKeySet /trustFramework/keySets/{id}
Get trustFrameworkKeySet
Get-MgBetaTrustFrameworkKeySetActiveKey /trustFramework/keySets/{id}/getActiveKey
trustFrameworkKeySet: getActiveKey
Get-MgBetaTrustFrameworkKeySetKeyV2 /trustFramework/keySets/{trustFrameworkKeySetId}/keysv2/{trustFrameworkKeyv2Id}
Get trustFrameworkKeyv2
Invoke-MgBetaUploadTrustFrameworkKeySetCertificate /trustFramework/keySets/{id}/uploadCertificate
trustFrameworkKeySet: uploadCertificate
Invoke-MgBetaUploadTrustFrameworkKeySetPkcs12 /trustFramework/keySets/{id}/uploadPkcs12
trustFrameworkKeySet: uploadPkcs12
Invoke-MgBetaUploadTrustFrameworkKeySetSecret /trustFramework/keySets/{id}/uploadSecret
trustFrameworkKeySet: uploadSecret
New-MgBetaTrustFrameworkKeySet /trustFramework/keySets
Create trustFrameworkKeySet
New-MgBetaTrustFrameworkKeySetKey /trustFramework/keySets/{id}/generateKey
trustFrameworkKeySet: generateKey
Remove-MgBetaTrustFrameworkKeySet /trustFramework/keySets/{id}
Delete trustFrameworkKeySet

Code Examples

C# / .NET SDK
Create trustFrameworkKeySet
// Code snippets are only available for the latest version. Current version is 5.x

// Dependencies
using Microsoft.Graph.Beta.Models;

var requestBody = new TrustFrameworkKeySet
{
	Id = "keyset1",
	Keys = new List<TrustFrameworkKey>
	{
		new TrustFrameworkKey
		{
			K = "k-value",
			X5c = new List<string>
			{
				"x5c-value",
			},
			X5t = "x5t-value",
			Kty = "kty-value",
			Use = "use-value",
			Exp = 99L,
			Nbf = 99L,
			Kid = "kid-value",
			E = "e-value",
			N = "n-value",
			D = "d-value",
			P = "p-value",
			Q = "q-value",
			Dp = "dp-value",
			Dq = "dq-value",
			Qi = "qi-value",
		},
	},
};

// 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.PostAsync(requestBody);
JavaScript
Create trustFrameworkKeySet
const options = {
	authProvider,
};

const client = Client.init(options);

const trustFrameworkKeySet = {
  id: 'keyset1',
  keys: [
    {
      k: 'k-value',
      x5c: [
        'x5c-value'
      ],
      x5t: 'x5t-value',
      kty: 'kty-value',
      use: 'use-value',
      exp: 99,
      nbf: 99,
      kid: 'kid-value',
      e: 'e-value',
      n: 'n-value',
      d: 'd-value',
      p: 'p-value',
      q: 'q-value',
      dp: 'dp-value',
      dq: 'dq-value',
      qi: 'qi-value'
    }
  ]
};

await client.api('/trustFramework/keySets')
	.version('beta')
	.post(trustFrameworkKeySet);
PowerShell
Create trustFrameworkKeySet
Import-Module Microsoft.Graph.Beta.Identity.SignIns

$params = @{
	id = "keyset1"
	keys = @(
		@{
			k = "k-value"
			x5c = @(
			"x5c-value"
		)
		x5t = "x5t-value"
		kty = "kty-value"
		use = "use-value"
		exp = 99
		nbf = 99
		kid = "kid-value"
		e = "e-value"
		n = "n-value"
		d = "d-value"
		p = "p-value"
		q = "q-value"
		dp = "dp-value"
		dq = "dq-value"
		qi = "qi-value"
	}
)
}

New-MgBetaTrustFrameworkKeySet -BodyParameter $params
Python
Create trustFrameworkKeySet
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph_beta import GraphServiceClient
from msgraph_beta.generated.models.trust_framework_key_set import TrustFrameworkKeySet
from msgraph_beta.generated.models.trust_framework_key import TrustFrameworkKey
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = TrustFrameworkKeySet(
	id = "keyset1",
	keys = [
		TrustFrameworkKey(
			k = "k-value",
			x5c = [
				"x5c-value",
			],
			x5t = "x5t-value",
			kty = "kty-value",
			use = "use-value",
			exp = 99,
			nbf = 99,
			kid = "kid-value",
			e = "e-value",
			n = "n-value",
			d = "d-value",
			p = "p-value",
			q = "q-value",
			dp = "dp-value",
			dq = "dq-value",
			qi = "qi-value",
		),
	],
)

result = await graph_client.trust_framework.key_sets.post(request_body)

App Registration

1

Navigate to Azure Portal

Go to App registrations in Microsoft Entra admin center

2

Add API Permission

Select your app → API permissions → Add a permission → Microsoft Graph

3

Select Permission Type

Choose Application permissions or delegated permissions and search for TrustFrameworkKeySet.ReadWrite.All

4

Grant Admin Consent

Application permissions always require admin consent.