Share via

How to attestation for verify pc security boot,... by using TPM Azure Attestation in C# Project

PThanh 0 Reputation points
2026-05-05T07:59:02.9266667+00:00

1.My project uses C# along with nuget:

,,,,,,,,,,,,,,,,,,,,,,,,,,,

Developer technologies | C#
Developer technologies | C#

An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.

0 comments No comments

2 answers

Sort by: Most helpful
  1. Nancy Vo (WICLOUD CORPORATION) 4,765 Reputation points Microsoft External Staff Moderator
    2026-05-06T03:53:08.67+00:00

    Hello @PThanh ,

    Thanks for your question.

    You can’t directly verify Secure Boot from C# by calling Azure Attestation alone. Azure Attestation only works if your app can first collect TPM attestation evidence from the PC (a TPM quote + measured boot log). Then Azure Attestation checks that evidence against a policy and returns a signed result token.

    You can refer to the following flow:

    1. PC creates “proof” The PC (Windows + TPM) creates proof that includes:
    • TPM quote (signed by TPM)
    • PCR values (numbers that represent boot measurements)
    • Measured Boot Log / Event Log (what was measured during boot)
    1. Send proof to Azure Attestation Your C# app sends that proof to your Azure Attestation Provider endpoint.
    2. Azure Attestation returns a result Azure returns an attestation token (JWT) that is signed by Azure. Your app verifies the JWT and checks the claims

    I hope this addresses your question. If this response was helpful, please consider following the guidance to provide feedback.

    Was this answer helpful?


  2. AI answer

    2026-05-05T07:59:11.8433333+00:00

    The context only documents the high-level TPM attestation workflow and policy behavior, not the exact JSON payload format, nonce handling, or quote/signature encoding required by the Azure Attestation TPM protocol. It does not describe the request schema for AttestTpmAsync, nor how to construct the quote, signature, nonce, and service_context fields for the second call, so the root cause of the 400 invalid data field error cannot be determined or corrected from the available information.


    References:

    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.