Skip to main content
Question

Enable Okta Extension for Safari

  • November 26, 2021
  • 6 replies
  • 44 views

Steven_Xu
Forum|alt.badge.img+7

spent 2 hours to figured out how to enable Okta extension for Safari, post it here if someone need it.

 

 

#!/bin/zsh # Safari Extensions File Path(my is macos 11.6): # ~/Library/Containers/com.apple.Safari/Data/Library/Safari/WebExtensions/Extensions.plist username=`/bin/ls -l /dev/console | /usr/bin/awk '{ print $3 }'` cd /Users/$username/Library/Containers/com.apple.Safari/Data/Library/Safari/WebExtensions/ enabled=$(plutil -extract "okta\\.ExtensionLauncher\\.Extension\\.WebExtension (B7F62B65BN)".Enabled raw Extensions.plist) if [ "$enabled" = "false" ]; then plutil -replace "okta\\.ExtensionLauncher\\.Extension\\.WebExtension (B7F62B65BN)".Enabled -bool "Yes" Extensions.plist jamf displayMessage -message "Okta Extension is enabled for Safari, please quit and reopen Safari." else echo "Okta Extension already enabled." fi

 

 

 

6 replies

Forum|alt.badge.img
  • New Contributor
  • 1 reply
  • November 26, 2021

Click Open Safari in the separate window. Enable the extension by navigating to Safari > Preferences > Extensions in your toolbar at the top left corner of your screen and checking the box for the Okta Extension App. Sign into the Okta End-User Dashboard to complete the setup.

 

alaskasworld


Steven_Xu
Forum|alt.badge.img+7
  • Author
  • Contributor
  • 47 replies
  • December 3, 2021

@Rowan45 you are right, we can manually enable it. but for hundreds of computers we need a better solution.


eatkins
Forum|alt.badge.img+1
  • New Contributor
  • 8 replies
  • October 20, 2022

You sir, have done this world a great favor.


iseeetray
Forum|alt.badge.img+6
  • New Contributor
  • 4 replies
  • October 25, 2022

Does this still work on Monterey? When running as script from terminal it works, but after uploading to Jamf and executing a policy it returns an error: "CFURLCopyResourcePropertyForKey failed because it was passed a URL which has no scheme"


Steven_Xu
Forum|alt.badge.img+7
  • Author
  • Contributor
  • 47 replies
  • March 24, 2023

Does this still work on Monterey? When running as script from terminal it works, but after uploading to Jamf and executing a policy it returns an error: "CFURLCopyResourcePropertyForKey failed because it was passed a URL which has no scheme"


it should work, maybe you need full disk access to run the script from jamf policy, the Safari folder is protected by SIP.

https://lapcatsoftware.com/articles/containers.html


iseeetray
Forum|alt.badge.img+6
  • New Contributor
  • 4 replies
  • March 28, 2023

it should work, maybe you need full disk access to run the script from jamf policy, the Safari folder is protected by SIP.

https://lapcatsoftware.com/articles/containers.html


Worked like a charm, thanks Steven