Closed rishigohil closed 7 months ago
Hi @rishigohil,
Thanks for your question. What version of the SDK are you using? Also, did you find the endpoint/API that does what you want in our API documentation? I basically want to know if something's missing in the SDK or if the Okta API doesn't fully support your use case.
Hello @laura-rodriguez ,
We currently use GetIdentityProviderAsync
to Get the Idp details using Okta.Sdk - 5.6.0
. Calling Get Identity Provider API provides us the _links
object and the href
property would contain the URL to the metadata.xml
document for SAML Identity Provider. Do we have the ability to pull metadata documents using SDK or a standalone API that I can call using GetCollection?
Thank you.
Maybe you can try the following:
1) Get metadata link from _links
var metadataUrl = myIdp.GetProperty<Resource>("_links")?
.GetProperty<Resource>("metadata")?
.GetProperty<string>("href");
2) Call the API directly I don't recall if this version of the SDK supports XML files, but if it doesn't, then you'll have to make the call manually.
I suggest you try first via Postman, and once you are sure about what the request looks like, port it to your C# code.
I hope this helps.
Yes, we are currently calling it manually but we were looking for a way to perform the same using the SDK to leverage all its internal features like auto-renewing the token. Do you have a method exposed for this operation in the latest version of the SDK or is that something in the works?
Thank you.
I see. Unfortunately, if the API doesn't expose a better way to get the metadata, that's currently your only option, regardless of the SDK version.
I suggest filing a feature request to allow the SDK to make requests to links leveraging all its internal features, like auto-renewing the token. We'll monitor it and gauge people's interest.
Closing this issue since 5.x is retired. If this is an issue in the current 7.x series, please feel free to reopen.
Describe the feature request?
I came through a scenario where I needed to fetch the SAML Identity Provider metadata.xml using the Okta SDK.
IOktaClient
contains a method for IdentityProvider operations but I could not locate a way to directly retrieve the metadata.xml document itself.Although the SDK offers the metadata.xml URL, we require the metadata document for further processing. Has anyone encountered a similar situation or found a workaround to fetch the SAML IdentityProvider metadata.xml via Okta SDK?
Thank you!
New or Affected Resource(s)
[/v1/idps/](https://developer.okta.com/docs/reference/api/idps/)
Provide a documentation link
https://developer.okta.com/docs/reference/api/idps/
Additional Information?
No response