Skip to Content

Logoff from HCP based SAPUI5 Applications

I am trying to use the standard logoff Service /sap/public/bc/icf/logoff for logoff on custom button, When i run this

https://webidetesting3880479-XXXXXtrial.dispatcher.hanatrial.ondemand.com/sap/public/bc/icf/logoff

It is giving HTTP Status 404 - Not Found error.

Even tried

window.location.href = "/sap/public/bc/icf/logoff?redirectURL=/sap/bc/bsp/sap/zpocnapp/index.htm";

Best regards, Rohit

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Dec 13, 2017 at 08:01 AM

    Hello, Rohit As far as I know the logoff service base on server level which means it provided by Netweaver server. It seems that the HCP doesn't provide the functionality yet. so when you try to call the link it will response 404. thanks

    Add comment
    10|10000 characters needed characters exceeded

  • Dec 22, 2017 at 01:54 PM

    Hi Rohit,

    To perform a logout of your SAPUI5 application on SCP, all you need to do is define a LogoutPage attribute on your neo-app.json descriptor.

    "logoutPage": "/logout/logout.html"

    Once you have it in place, your button can call this URL and SCP will take care of the rest. Remember to make this resource "unprotected"

    "securityConstraints": [
            {
                "permission": "accessUserData",
                "description": "Access User Data",
                "protectedPaths": [
                    "/"
                ],
                "excludedPaths": [
                    "/logout/**"
                ]
            }
        ]

    Here is the doc for this.

    Regards,
    Ivan

    Add comment
    10|10000 characters needed characters exceeded