id as studentId. Proceed only when you have identified one existing account with the student role. The filter narrows the results; it is not a substitute for checking the returned account.
See the students query reference for the supported filter and return fields.