HypLoginEssbaseCloudBasicAuth
Describes the Oracle Smart View for Office VBA function, HypLoginEssbaseCloudBasicAuth.
Cloud data provider types: Oracle Essbase
On-premises data provider types: Oracle Essbase
Description
The HypLoginEssbaseCloudBasicAuth function is specifically designed for use with Essbase for Cloud and
on-premises Essbase 21c and later.
It requires that you use the "/essbase/rest/v1/session"
REST
endpoint URL for generating the login token.
Note:
-
HypLoginEssbaseCloudBasicAuth is for use in Essbase Cloud environments that support Basic Auth authentication.
-
HypLoginEssbaseCloudBasicAuth supports on-premises Essbase 21c or later. This function will not work with the APS_ONLY deployment type on-premises Essbase environments.
-
Essbase users having an older VBA implementation which uses HypConnect for silent authentication will need to call HypLoginEssbaseCloudBasicAuth to generate a valid token before HypConnect.
Syntax
Public Declare PtrSafe Function HypLoginEssbaseCloudBasicAuth Lib "HsAddin" (ByVal vtUser As Variant, ByVal vtPassword As Variant, ByVal vtUrl As Variant) As Long
ByVal vtUser As Variant
ByVal vtPassword As Variant
ByVal vtUrl As Variant
Parameters
vtUser: A valid user name
vtPassword: The password for this user
vtUrl: URL of the provider
Return Values
Returns 0 if successful; otherwise, returns the appropriate error code.
Example
Sub LoginUsingBasicAuthForEssbaseCloud()
Dim user, password As String
user = "<user>"
password = "<password>"
url = "http://<serviceURL>/essbase/rest/v1/session"
sts = HypLoginEssbaseCloudBasicAuth(<user>, <password>, <url>)
If sts = 0 Then
MsgBox "successful"
End If
End Sub
Note:
If the session is invalidated due to timeout or other issues, you will have to rerun the VBA for reauthentication.