Skip to content

Conversation

@FFFreak
Copy link

@FFFreak FFFreak commented Nov 1, 2021

This edits _oktaMakeCall to check a state variable based on uri passed to the function to make a unique variable to hold state of websessions. This allows the global:mywebsession variable to be saved at end of function and recalled for EACH org in the Okta_org.ps1. Checking/Saving mywebsession at the start and end of that function allows multiple Okta Orgs to be called within the same Powershell Session.

TODO: There might be invalid characters possible in variable names resulting in unexpected behavior. I did not validate if URL host characters can be the same character space as powershell variable names.

I left some debug code in the prior suggestion.  This is without the 2 lines of debug code.

This edits _oktaMakeCall to check a state variable based on uri passed to the function to make a unique variable to hold state of websessions.  This allows the global:mywebsession variable to be saved at end of function and recalled for EACH org in the Okta_org.ps1.

TODO: There might be invalid characters possible in variable names, I did not validate if URL host characters can be the same space as powershell variable names.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant