A quick post for those who are trying to use the CMDlet New-MgBetaEntitlementManagementAccessPackageAssignmentRequest.

If you have wondered how the answers input values should look like this should help. It is Beta but might help until the doco is updated.

Documentation Link

$answers = @(
        @{
            "@odata.type" = "#microsoft.graph.accessPackageAnswerString"
            value = "The answer to the question"
            answeredQuestion = @{
                "@odata.type" = "#microsoft.graph.accessPackageTextInputQuestion"
                id = "$questionId"
            }
        }
    )

New-MgBetaEntitlementManagementAccessPackageAssignmentRequest -RequestType 'AdminAdd' -AccessPackageId $accessPackageId -AssignmentPolicyId $accesPackagePolicyId -TargetEmail $userEmail -Answers $answers

Mg Beta: Entitlement Management -Answers Switch Fix