Access Token Custom Claims from Header or QueryString Parameter?

I would like to insert a custom claim (or some other property) that includes a value from a header or querystring parameter that was present in the request to obtain the access token.

I reviewed the expression language for claims and did not see any functions that enable this.

Is it possible and if so how?