Forum Discussion
- OS_PizzaContributor III
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- MarkHoughtonContributor
Thanks for this very useful piece of code, it certainly works for my OKTA sign in.
- twallden1New Contributor
Would this work for someone who has an Azure account? I am trying to log in with my Azure but I do not appear to be getting through.
- PhilBNew Contributor III
Hi Cosimo,
There is a OS Knowledge Base article about this: KB0010071
In practice, it looks something like this:
Sub RefreshXFFunctions() Set XFAddIn = application.COMAddIns("OneStreamExcelAddIn") If Not XFAddIn Is Nothing Then If Not XFAddIn.Object Is Nothing Then Call XFAddIn.Object.RefreshXFFunctions End If End If
End Sub
or
Sub RefreshCubeViews() Set XFAddIn = application.COMAddIns("OneStreamExcelAddIn") If Not XFAddIn Is Nothing Then If Not XFAddIn.Object Is Nothing Then Call XFAddIn.Object.RefreshCubeViews End If End If End Sub
- CosimoContributor II
Thank Phil. This is exactly what I was looking for. Interesting to note that I had to run 3 functions to simulate “Refresh Workbook”:
> Sub Refresh_Workbook() > Set XFAddin = Application.COMAddIns("OneStreamExcelAddIn") > If Not XFAddin Is Nothing Then > If Not XFAddin.Object Is Nothing Then > Call XFAddin.Object.RefreshXFFunctions > Call XFAddin.Object.RefreshQuickViews > Call XFAddin.Object.RefreshCubeViews > End If > End If > End Sub
- MarkHoughtonContributor
Thanks Cosimo for this extra info, also I found that in the Preferences... Enable Macros for XF Event Processing needed to be set to FALSE for it to work.
- SaurinPatelNew Contributor III
any example for PingFed sing in?
- OS_PizzaContributor III
Can you describe your requirement in detail?
- SaurinPatelNew Contributor III
I want to automate OneStream refresh, but for authentication we use PingFed.
Related Content
- 3 months ago
- 8 months ago
- 2 years ago
- 3 years ago
- 11 months ago