Thank you for post!
I understand that you would like to add a custom attribute and pass the attribute to your application.
Please read to Add or deactivate custom security attribute definitions in Microsoft Entra ID
once you add the custom attribute you can assign the attribute to application for more information please go through https://learn.microsoft.com/en-us/entra/identity/enterprise-apps/custom-security-attributes-apps?pivots=portal#assign-custom-security-attributes-to-an-application.
Hope this helps. Do let us know if you any further queries by responding in the comments section.
Thanks,
Akhilesh.
If this answers your query, do click Accept Answer
and Yes
for was this answer helpful. And, if you have any further query do let us know.