okta / okta-sdk-dotnet

A .NET SDK for interacting with the Okta management API, enabling server-side code to manage Okta users, groups, applications, and more.
Other
160 stars 100 forks source link

Unable to access Links (_links) in version 7 for an IdentityProvider when using GetIdentityProviderAsync/CreateIdentityProviderAsync #700

Closed anirvanroy1986 closed 5 months ago

anirvanroy1986 commented 8 months ago

Describe the bug?

I am trying to retrieve the metadata and ACS information of an IdentityProvider. From the documentation, it is supposed to appear in _links property and I also do see it in postman response in the following format:

"_links": { "metadata": { "href": "<url>/metadata.xml", "type": "application/xml", "hints": { "allow": [ "GET" ] } }, "acs": { "href": "<url>", "type": "application/xml", "hints": { "allow": [ "POST" ] } }, "users": { "href": "<url>/users", "hints": { "allow": [ "GET" ] } }, "deactivate": { "href": "<url>/lifecycle/deactivate", "hints": { "allow": [ "POST" ] } }

The readme(https://github.com/okta/okta-sdk-dotnet/tree/legacy-5.x-series#get-data-from-_links) talks about version 5 using the GetProperty Resource, but this class has been removed in version 7 and the Links property is returned as Null in the SDK response. Can you please provide a workaround as this is a critical functionality that I am trying to access from the API and I don't see any way.

What is expected to happen?

A way to access Links property for an IdentityProvider object.

What is the actual behavior?

Links is null in the SDK response

Reproduction Steps?

  1. Use .Net SDK version 7.
  2. Call IIdentityProviderApi.GetIdentityProviderAsync(idpId), where idpId is the ID of the Identity provider
  3. Check the IdentityProvider object returned in the response.

Additional Information?

No response

.NET Version

8.0.201

SDK Version

7.0.5

OS version

Darwin MacBook-Pro 22.6.0 Darwin Kernel Version 22.6.0: Tue Nov 7 21:40:08 PST 2023; root:xnu-8796.141.3.702.9~2/RELEASE_ARM64_T6000 arm64

laura-rodriguez commented 8 months ago

Thank you for letting us know! I filed an internal ticket so the team prioritizes it accordingly.

Internal Ref: OKTA-709947