Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to update policy conditions in SDK 7.x #419

Open
jackwhelpton opened this issue Jun 23, 2024 · 0 comments
Open

Unable to update policy conditions in SDK 7.x #419

jackwhelpton opened this issue Jun 23, 2024 · 0 comments
Labels

Comments

@jackwhelpton
Copy link

Describe the bug

The Policy object in the 7.x version of the node SDK lacks the conditions property, breaking the 6.x paradigm of fetching a policy, updating this collection and saving it back. No workaround is documented in the release notes.

Reproduction Steps?

  • Update @okta/okta-sdk-nodejs library to 7.x
  • Attempt to migrate the following code:
const policyDetails = await this.oktaClient.getPolicy(policyId);
policyDetails.conditions.people.groups.include.push(groupId);
await this.oktaClient.updatePolicy(policyId, policyDetails);

using:

const policyDetails = await this.oktaClient.policyApi.getPolicy({ policyId: policyId });
...

Observe that the Policy object lacks a conditions property.

SDK Versions

System:
OS: Windows 11 10.0.22631
CPU: (12) x64 Intel(R) Core(TM) i7-10750H CPU @ 2.60GHz
Memory: 4.07 GB / 15.71 GB
Binaries:
Node: 21.3.0 - C:\Program Files\nodejs\node.EXE
npm: 10.2.4 - C:\Program Files\nodejs\npm.CMD
Browsers:
Edge: Chromium (126.0.2592.68)
Internet Explorer: 11.0.22621.3527
npmPackages:
@okta/okta-sdk-nodejs: ^7.1.1 => 7.1.1

Additional Information

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant