Now Azure supports extension attributes (1-15) as Name Identifier (nameid) in SAML token. This option is available for both Gallery and Custom applications.
Using the Claims Editor, now you can select, Extension Attributes 1 –10 as the unique identifier.
Previously, we had only a few attribute options (user.mail , user.onpremisessamaccountname , user.userprinciplenae and ExtractMailPrefix() fuciton) as name identifier. We couldn’t use any custom values using extension attribute.