This should work, but my strings are null
/Get the details for this group
EnrollmentGroup group = await provisioningClient.GetEnrollmentGroupAsync(groupId);
logger.LogInformation("Got Enrollment Group: {group}", JsonConvert.SerializeObject(group));
var attestation =(SymmetricKeyAttestation)group.Attestation;
var primaryKey = attestation.PrimaryKey;
var secondaryKey = attestation.SecondaryKey;
if(string.IsNullOrEmpty(primaryKey))
logger.LogWarning("No Primary Key");
if(string.IsNullOrEmpty(secondaryKey))
logger.LogWarning("No Secondary Key");
logger.LogInformation("Got Keys {pri} and {sec}", primaryKey, secondaryKey);
GetEnrollmentGroupAsync(string) seems to work. It returns an enrollmeent group that has a symmetric key attestation.
Per the docs, there is a getter for those.
The correct Call is GetEnrollmentGroupAttestationAsync
This assumes it was a SymmetricKeyAttestation. AttestationMethod has a
Typeproperty if you need to determine type dynamically.