Afternoon Naresh, Emilian here with Customer Support, thanks for reaching out to us! Regarding the matter you've addressed, the Okta integration with ServiceNow works based on a provisioning API, allowing us to push user attributes and receive application data.
Unfortunately our Expression language is slightly limited concerning group functions (please refer to the support documentation below), and we're unable to refer to the GroupID. Therefore, the only way I'm thinking this information may be passed is by creating custom attributes for the Okta profile, extracting this information via API calls and updating each user's custom attribute that you've created with the corresponding data. Link #1 - Expression Language: https://developer.okta.com/reference/okta_expression_language/#group-functions
However, if you're simply willing to pass through groups alongside membership, you can leverage our Push Groups functionality, support documentation below. Link #2 - Group Push: https://help.okta.com/en/prod/Content/Topics/Directory/Directory_Using_Group_Push.htm?Highlight=push%20group
Hope this helps answer your query!
Emilian Aldea Technical Support Engineer Okta Global Customer Care