We are using IdentityServer4 with Client Credential Grant Type but for one of consumer we tweaked Client Credential flow and introduced Delegation Grant Type and that's where we inject UPN claim in AccessToken as there will not be UPN claim in Access Token generated using Client Credential flow. Purpose of doing this is our upstrem apps authorize our API calls based on User.
Does Azure AD has any functionality where I can provide custom value of UPN claim for App and when that particular App is being used to generate access token using Client Credential flow, UPN claim with custom value will be available in Access Token?