Forum Discussion
OS_Pizza
2 years agoContributor III
If the answer helped you, Please give kudos and mark the answer as accepted solution
- Open an excel workbook
- Press Alt+F11 to open VBA Editor
- Insert a New Module from Insert Menu
- Copy the below code and Paste in the code window.
With an Okta user you could try the following:
' Set Excel Addin object
Set xfAddin = Application.COMAddIns("OneStreamExcelAddIn").Object
'OneStream Web URL
url = ""
'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)
' Get user from SSO token
user = xfAddin.GetXFUserNameFromSSOToken(ssoToken)
' log into application using token
isLoggedIn = xfAddin.LogonAndOpenApplication(url, user, ssoToken, app)
If isLoggedIn Then
Refresh = xfAddin.RefreshQuickViewsForActiveWorksheet()
Else
MsgBox ("Problem with login")
End If
Save the file as macro enabled workbook
Open the workbook to test it, it will Run a Macro Automatically.
- accountant2 years agoNew Contributor II
This looks great!
Now to figure out credentials.....
- OS_Pizza2 years agoContributor III
What about credentials ? You just to have put the credentails once and done.
- AdamB9 months agoNew Contributor II
Do you know if this Okta login module will work with version 8?
Related Content
Re: Does OneStream have the capability to refresh Cube View connections within Excel workbooks via XFDoc or some other type of functionality? Goal is to schedule the refresh & distribution of an Excel workbook via the Book or other functionality, so that both CVs and XFGetCells can be used. Per our prior testing, when using an XFDoc.Xlsx file type, the XFDoc will refresh XFGetCells when retrieved. However, it does not refresh cube view connections embedded in the Excel XFDoc.
26 days ago- 8 months ago