Forum Discussion
With an Okta user you could try the following:
' Set Excel Addin object
Set xfAddin = Application.COMAddIns("OneStreamExcelAddIn").Object
'OneStream Web URL
url = "https://server/OneStreamWeb"
'okta user credentials
oktaUsername = "enter okta username"
oktaPassword = "enter okta password"
' app name
app = "enter application name"
' get SSO Token
ssoToken = xfAddin.ProcessSSOAuthenticationAndCreateToken(url, oktaUsername, oktaPassword)
' display token, only use for validating, if no token exists then login will not be successful
MsgBox ssoToken
' Get user from SSO token
user = xfAddin.GetXFUserNameFromSSOToken(ssoToken)
' log into application using token
isLoggedIn = xfAddin.LogonAndOpenApplication(url, user, ssoToken, app)
If isLoggedIn Then
MsgBox ("Logged into OneStream")
Refresh = xfAddin.RefreshQuickViewsForActiveWorksheet()
xfAddin.Logoff
Else
MsgBox ("Problem with login")
End If
Thanks for this very useful piece of code, it certainly works for my OKTA sign in.
Related Content
- 3 months ago
- 8 months ago
- 2 years ago
- 3 years ago
- 11 months ago