
venkatd.41211 (Customer) asked a question.
I am trying to pass dynamic attribute value as part of SAML request so it is included in the SAML response. I am unable see the attribute returned as part of the SAML response.
Sample request and I do not see attribute TestRole_Dynamic included in the SAML response.
<samlp:AuthnRequest xmlns="urn:oasis:names:tc:SAML:2.0:metadata"
ID="test_demo"
Version="2.0"
IssueInstant="2022-12-06T02:09:23Z"
IsPassive="false"
AssertionConsumerServiceURL="https://example.com/saml"
xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol"
ForceAuthn="false"
>
<samlp:Extensions>
<md:AttributeConsumingService index="0"
xmlns:md="urn:oasis:names:tc:SAML:2.0:metadata"
xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion"
>
<md:RequestedAttribute Name="TestRole_Dynamic"
isRequired="true"
NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:unspecified"
>
<saml:AttributeValue>test_role_name_dyamic</saml:AttributeValue>
</md:RequestedAttribute>
</md:AttributeConsumingService>
</samlp:Extensions>
<Issuer xmlns="urn:oasis:names:tc:SAML:2.0:assertion">http://www.okta.com/mytestapp</Issuer>
</samlp:AuthnRequest>

From what I understand in your question, I believe this article would greatly assist:
How to Define and Configure a Custom SAML Attribute Statement
Once configured, please use the "Preview SAML" button so you can see what that assertion would look like.
Please let me know if that does not help answer your question and I will try to assist again. Thanks!