Symptom
Failed to Trigger Multi Action via Multi Action API
Error may show up as:
- HTTP 401 error
- HTTP 403 error
- HTTP 404 error
- You do not have rights to access the connections of XXX
- The multi action couldn't be validated, because there are no members defined for the parameter Request_ID."
- No value was provided for the parameter
-
Defined URL forces users to login to the SAC tenant despite the Oauth client configured
Environment
SAP Analytic Cloud
Reproducing the Issue
- Trigger Multi Action externally
- Test URL in Postman
Cause
Missing Configurations
Resolution
- Get a Valid CSRF Token for the Multi Action API
- Create a blank collection in Postman:
- Add a Get request for CSRF, navigate to Authorization page:
- Fill in Authorization page
- Add a New OAuth Client if you need, SAC Tenant-> System -> Administration -> App Integration -> Add a New OAuth Client
- Copy content
- Select Type: "OAuth 2.0".
- Choose Grant type: "Authorization Code".
- Callback URL:
- If you've selected "Authorize using browser", Then you will need to fill in "Redirect URI" in OAuth Client with the fixed URL "https://oauth.pstmn.io/v1/callback".
- If you've not selected "Authorize using browser", Then you will need to fill in both "Callback URL" and "Redirect URI" with "https://www.getpostman.com/oauth2/callback".
- in case of SAP Support: select "Authorizat using Browser"
- Fill in Auth URL: copy from "Authorization URL".
- Fill in Access Token URL: copy from "Token URL".
- Fill in Client ID: copy from "OAuth Client ID".
- Fill in Client Secret: copy from "Secret".
- Click "Get New Access Token". The login page will appear. Please log in with your account
- After login, Click “Use Token” to get the “Access Token”
- Token is in use. Choose one of the following two authentication types:
- Oauth 2.0 Type:
- “Bearer Token” Type:
- Oauth 2.0 Type:
- Fill in CSRF URL, fill in header per Help Document: Get a Valid CSRF Token for the Multi Action API
- Click “Send”, if request successfully, will get x-csrf-token in header of response:
- Create a blank collection in Postman:
- Trigger Multi Action API
- Add a POST request “Trigger MA API”
- Navigate to “Authorization”, select “OAuth2.0”, select “TokenSample” which created in step 1.4:
- Fill in API URL and Add header per Help Document:/multiActions/<multiActionID>/executions
- Open the Multi Action in SAC tenant, copy its “API URL”:
- Fill in API URL with copied URL, add the headers, x-csrf-token’s value that comes from step 1.7:
- Open the Multi Action in SAC tenant, copy its “API URL”:
- Fill Body per Help Document: /multiActions/<multiActionID>/executions (in this sample screen shot, the multi action does not have parameter)
- click Send, if URL triggers successfully, get return value including “executionID”
- Add a POST request “Trigger MA API”
- Query the execution status of a triggered Multi Action
- Add a Get request for Querying status, navigate to “Authorization”, select “OAuth2.0”, select “TokenSample” which created in step 1.4:
- Enter URL by copy “executionID” from step 2.5.( copy “Polling API URL” as Step 2.3.1, replace <executionId>)
- Click Send, get the status
- Add a Get request for Querying status, navigate to “Authorization”, select “OAuth2.0”, select “TokenSample” which created in step 1.4:
- Must-Know:
- Prerequisites:
- The Multi Action Service supports two OAuth authentication flows:
- OAuth 2.0 Authorization Code Grant:
Please note: One of the limitations of OAuth 2.0 Authorization Code Grant, is that it generally requires the end-user to input their account/password to log in to SAC explicitly as to get the authorization code and continue the authentication process.
Considering the scenario where the consumption of multi-actions public API is embedded in a fully automated process with no possible user interference, you may consider the OAuth2 SAML Bearer Assertion workflow as an alternative solution. - OAuth 2.0 SAML Bearer Assertion
- OAuth 2.0 Authorization Code Grant:
- the access token retrieved by the "client credential" grant type is not supported by the Multi Action API
- Multi Action API is supported since SAC Version: 2023.15 [To check your SAC version: Please go to SAC tenant - System - About]
- Please note: You need to flag "Allow External API Access" when create the Multi Action:
[To check the flag: Please go to SAC tenant - Multi Action - Settings (button will be available once saved ) ]
- The Multi Action Service supports two OAuth authentication flows:
- Prerequisites:
See Also
- SAC Online Help: api/v1/multiActions
- API help: MultiActions Service
- SAP Blog: Introduction of SAC Multi-actions Public API
- 3379810 Error code when executing the SAC multi-actions via the public API (api/v1/multiActions)
Keywords
Multi Action API POSTMAN URL 401 403 OAuth 2.0 SAML Bearer Assertion OAuth 2.0 Authorization Code Grant OAuth2SAML Token URL request response code status 400 403 401 404 multi action multiaction sap analytics cloud, cloud analytics tools, analytics in the cloud, cloud analytics software, multiaction, multiactions Authorize code CSRF Token CPI cloud integration HttpResponseException failed fail unauthorized Failed to get Response from Connectivity Service oauth/token oauth token adapter http api exception https api/v1/multiActions PaPM Cloud [Multi-actions] Request_ID status failed accept multiActionId parameterValues BTP BTP Process Automation , KBA , LOD-ANA-PL-MA , Multi Actions , Problem
Product
Attachments
3407120_1_2.png |
3407120_2_3_2.png |
Pasted image.png |
Pasted image.png |