Closed rishigohil closed 6 months ago
Hi @rishigohil, Thanks for reporting this issue. Would you mind sharing the raw response as well?
When I perform the get call using GetPolicyWithHttpInfoAsync
or GetPolicyAsync
, I am receiving an exception with Error Content as follows:
{ "detail": "Requested resource could not be found.", "status": 404, "title": "Not Found" }
Internal Ref: OKTA-710435
Hi @rishigohil, I'm looking into this issue now and would appreciate additional information.
In the issue description, you mentioned you created a Policy Rule, but then you're using the _policyApiAsync.GetPolicyAsync ()
method to retrieve. If you want to retrieve a Policy Rule, use the GetPolicyRuleAsync
method instead. For example:
var retrievedPolicyRule = await _policyApi.GetPolicyRuleAsync(createdPolicy.Id, createdPolicyRule.Id) as PasswordPolicyRule;
If you're actually trying to retrieve a policy, could you please share what type of policy is and the payload you get from the server?
Thank you!
Closing this issue due to lack of activity. Feel free to reopen if this is still an issue.
Describe the bug?
I am trying to retrieve the policy rule using
_policyApiAsync.GetPolicyAsync
but it always fails with404 - Resource not found
error even when Policy exists in the Okta org.I went on to add
Okta.Sdk
project reference to troubleshoot the internal error and found that the code does retrieve the policy successfully but is not able to mount properly toOkta.Sdk.Model.Policy
. It sends an exception while performing the serialization operation.What is expected to happen?
GetPolicyAsync
should return policy if it exists in the Okta OrgWhat is the actual behavior?
GetPolicyAsync
fails with an internal exceptionReproduction Steps?
_policyApiAsync.GetPolicyAsync
or_policyApiAsync.GetPolicyWithHttpInfoAsync
Video showing the Internal Okta SDK Exception
https://github.com/okta/okta-sdk-dotnet/assets/5967748/9d7de3f3-7643-4155-96ed-a39930a634e6
Additional Information?
No response
.NET Version
.NET 6.0
SDK Version
7.0.5
OS version
BuildNumber Caption OSArchitecture Version 22621 Microsoft Windows 11 Enterprise 64-bit 10.0.22621