Skip to Content

Facebook Campaign and OAuth authentication

Hi everyone,

We are running SAP Hybris Marketing 1702 on premise and currently trying to setup the Facebook integration with our system. The setup is done according to the integration guide page 21 ff:

Before clicking the authenticate button within the facebook campaign the output of "OA2C_GRANT" is as following:

When I now open a new facebook campaign the popup appears "to create a campaign, authenticate with Facebook Ads". After confirming with a click on the authenticate button the redirect to "https://ourserver:port/sap/bc/ui5_ui5/sap/CUAN_NAV_TO/index.html#CUAN_TI_F_INI_MKT_AUTOMATION_ENDPOINT?sap-client=100" is executed with the following message:

After closing the window and refreshing the facebook campaign or when creating a new facebook campaign the system is still asking for authentication.

However when we refresh the Oauth 2.0 Cleint accounts from above I can see the following:

A token seems to have been assigned. But for some reason hybris marketing seem to be unaffected from it.

Could anyone please assist on how to troubleshoot this issue?

Regards Christopher.

01.png (61.8 kB)
02.png (14.6 kB)
03.png (3.4 kB)
04.png (16.2 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

5 Answers

  • Best Answer
    avatar image
    Former Member
    Jun 08, 2017 at 09:16 AM

    Dear Mr. Günther,

    another point which just came to your mind: Have you implemented the latest notes for the Facebook integration? Eg. 2470543 - Facebook Integration V2.9. [Background here is that Facebook regularly changes their marketing API (couple of times per year).]

    Kind regards

    Svend Domdey (Hybris Marketing Development)

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jun 09, 2017 at 08:05 AM

    Hi everyone,

    regarding the SAP Hybris Marketing Facebook Integration (especially OAuth) I can recommend the following troubleshooting and tools.

    1) Did run trough all steps of the SAP Hybris Marketing Installation/Integration Guide for Facebook Integration? Go to help.sap.com and search for Hybris Marketing

    - SAP Hybris Marketing Cloud: https://help.sap.com/viewer/p/SAP_HYBRIS_MARKETING_CLOUD --> Section Integration

    - SAP Hybris Marketing (on premise): https://help.sap.com/viewer/p/SAP_HYBRIS_MARKETING --> Section Integration --> view all --> Integration Guide

    2) Is your Facebook App already reviewed? The app must be reviewed by Facebook

    3) Check that you have set up an ad account in Facebook:www.facebook.com-> (settings on right top corner)

    ) Run Authentication Button from SAP Hybris Marketing UI and check for errors in the URL in the browser address bar of the target endpoint (or even in the browsers console) - if error messages occur then check the http log via transaction smicm -> go to -> trace file --> display all)

    On premise only:

    4) Did you install all necessary SAP Notes so that your Hybris Marketing matches your Facebook Apps version (on premise only)?

    5) Run Authenticate from the transaction oa2c_grant and check for errors in the url address bar of the target endpoint (or even in the browsers console) - if error messages occur then check the http log via transaction smicm -> go to -> trace file --> display all)

    6) Try to cal lhttps://www.facebook.comwith a get request from /IWFND/GW_CLIENT

    7) Double check the http log transaction smicm -> go to -> trace file --> display all) check for error related to Facebook

    Errors regarding Facebook Integration which might occur in http log or gateway client:

    - HTTP Receive failed: SSL handshake with graph.facebook.com:443 failed SSSLERR_PEER_CERT_UNTRUSTED

    --> Import right certificate used by Facebook to the system

    -NIECONNECtiON failed:

    --> Check and correct setup of proxy settings needs to be clarified by customer IT

    -Authentication Flow stops in Facebook "redirect URI problem" --> maintain in the app the redirect uri

    --> concatenate redirect uri manually like stated in the integration guide/application help (for on premise look up of redirect uri in oa2c_config) and copy to Facebook app --> settings --> advanced --> Valid OAuth redirect URIs

    - http Connection failed: proxy --> check proxy setting and white list (filter) e.g. add host as filter to whitelist to bypass proxy

    8) In case you use custom audiences. Did you accept the Facebook terms and conditions for custom audiences?

    Check the link. (In case you did not accept the terms and conditions you should see an info "You have accepted these terms of service") - Check that you choose the right ad account on the left-hand side

    https://www.facebook.com/ads/manage/customaudiences/tos.php?_=_

    If the link is not working you can check manually:

    https://www.facebook.com/policies--> Ads --> Targeting --> applicable terms - Check that you choose the right ad account on the left-hand side

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Experts,

      What will be Domain URL to enter in APP for Hybris Marketing Cloud? I have formatted URL as per below format:

      URL format: https://host:port/sap/public/bc/sec/oauth2/client/redirect?sap-client=100

      I am receiving below error while doing authentication:

      "Can't Load URL: The domain of this URL isn't included in the app's domains. To be able to load this URL, add all domains and subdomains of your app to the App Domains field in your app settings."

      Thanks and regards,

      Dinesh.

  • Jun 08, 2017 at 08:12 AM

    So I tried Google Chrome instead of IE and there the redirect works fine. I get a shot notification that the authentication was successfully.

    However, right afterwards a error message pops up:

    The full error message is:

    {
       "error":{
          "code":"CUAN_MARK_ORC_EXEC/129",
          "message":{
             "lang":"en",
             "value":"There was an issue with request parameters: Code                                               400, message 'Bad Request'."
          },
          "innererror":{
             "application":{
                "component_id":"CEC-MKT-EXP",
                "service_namespace":"/SAP/",
                "service_id":"CUAN_CAMPAIGN_SRV",
                "service_version":"0001"
             },
             "transactionid":"843E40F111460090E005923B5993182C",
             "timestamp":"",
             "Error_Resolution":{
                "SAP_Transaction":"",
                "SAP_Note":"See SAP Note 1797736 for error analysis (https://service.sap.com/sap/support/notes/1797736)",
                "Batch_SAP_Note":"See SAP Note 1869434 for details about working with $batch (https://service.sap.com/sap/support/notes/1869434)"
             },
             "errordetails":[
                {
                   "code":"CUAN_MARK_ORC_EXEC/129",
                   "message":"There was an issue with request parameters: Code                                               400, message 'Bad Request'.",
                   "propertyref":"",
                   "severity":"error",
                   "target":""
                }
             ]
          }
       }
    }

    So I am a little further but I am still stuck.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jun 08, 2017 at 09:02 AM

    Dear Mr. Günther,

    at first glance, this error is originating from the call to Facebook when the Hybris Marketing system tries to read the list of available ad accounts and objectives for your Facebook app. We have seen cases where such an error was returned from Facebook because the terms and conditions for the Marketing API have not been confirmed in the Facebook app.

    If this is not the case, I would kindly ask you to open a customer incident for this on component CEC-MKT-INT-FBI so that we can have a closer look into this.

    Kind regards

    Svend Domdey (Hybris Marketing Development)

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Christopher Günther

      Hi Christopher,

      here are some ideas for checking:

      - Have you added the marketing API to your app (listed in "Products" or similar)? When doing that, the terms and conditions need to be confirmed.

      - Are there any ad accounts for your app?

      - Have you checked if you can perform any requests to the Marketing API using the Graph explorer? Eg enter "me?fields=adaccounts{users{permissions,role},name,account_id},id" on https://developers.facebook.com/tools/explorer/

      Kind regards

      Svend Domdey

  • avatar image
    Former Member
    Dec 08, 2017 at 10:19 AM

    A summary of the troubleshooting for SAP Hybris Marketing Facebook Ads Integration as SAP Note

    2574247 - SAP Hybris Marketing Facebook Ads Integration Trouble Shooting Guide

    https://launchpad.support.sap.com/#/notes/2574247

    Issues like client not on latest the API Version, Facebook App, OAuth, Authentication Errors, Authentication Flow not working, no ad accounts displayed, Facebook Custom Audience terms and conditions not accepted and others are covered.

    Add comment
    10|10000 characters needed characters exceeded