To download metadata xml file from OKTA service provider
Login to OKTA Admin Account.
Navigate to Security > Identity Providers > Add Identity Provider > SAML 2.0.
Configure SAML Identity provider and click Finish.
Click Configure.
Click Download Certificate.
Open the certificate and copy the content of the certificate.
Close the certificate.