Cognos Analytics

Cognos Analytics

Connect, learn, and share with thousands of IBM Cognos Analytics users! 


#Product
#Analytics
#CognosAnalytics
#Analyticstools
#TechXchange Partner
#TechXchange Session
#TechXchange Presenter
#AI
 View Only
Expand all | Collapse all

Slack Integration: Failed while trying to Authenticate

  • 1.  Slack Integration: Failed while trying to Authenticate

    Posted 12/18/18 09:20 AM
    Hi,

    I created a Slack app and added it to the collaboration section of Cognos. When I press the 'Test' button, I see the Slack popup asking me for permission, but when I grant that, Cognos gives a warning: 'Failed while trying to authenticate.' The collaboration platform is still visible in the share fly-out, but gives a full error: "Cannot share message on Slack Integration: Failed while trying to authenticate."

    In the debug window I can see a call to :

    https://OurServer/ibmcognos/bi/v1/collaboration/providers/slack/abignumber/workspaces/asecretnumber/me

    And the content of the result is (scrambled):

    {
    "authState": "abignumber",
    "clientId": "client.id",
    "ok": false,
    "error": "token_invalid",
    "authScope": "mpim:write,chat:write:user,files:write:user,channels:read,users:read,groups:read,im:read",
    "workspaceUrl": "oursecretworkspace"
    }

    Our server is not reachable from the Internet but the documentation does not mention that to be an issue. I did follow the slack and cognos tutorials, so am not sure where the mistake is I made. Any help would be appreciated.

    ------------------------------
    Reinier Battenberg
    ------------------------------

    #CognosAnalyticswithWatson


  • 2.  RE: Slack Integration: Failed while trying to Authenticate

    Posted 12/19/18 08:49 AM
    Hi Reiner
    I had similar problems !...the documentation and tutorials really need to be improved IMHO to enable this functionality !.
    Nick

    ------------------------------
    Nick Waters
    ------------------------------



  • 3.  RE: Slack Integration: Failed while trying to Authenticate

    Posted 12/19/18 11:55 AM
    Edited by System Admin 01/20/23 04:13 PM

    Hi Reinier,

    Thanks for posting on the community!

    The "token_invalid" error you are receiving is an internal check we do and it is normal for it to show in the debug window. As well, I assume you have internet access and by "Our server is not reachable from the Internet", you mean no one outside your network can reach it? If it's the latter, then it should be fine.

    Here are some suggestions to try out:

    1. When adding your workspace, please add everything you see in your workspace URL
      Eg: You would enter ibm-analytics if your workspace URL is ibm-analytics.slack.com, including the hyphen
    2. Ensure you copy/pasted the right Client ID and Client Secret from your Slack application
    3. Ensure your Redirect URL is present in your Slack application as per step 10
    4. If you are on an Slack Enterprise Grid, you might have to request approval from your Slack admin to authorize the app as per step 15

    Please share a screenshot of what you see in the pop-up window after clicking Test and we can look into it further

    Nick, we recognize it and already have updates coming to the documentation soon. As well, a tutorial video for the integration is in the works as well. Stay tuned! ​​​​

    ------------------------------
    MOHAMMED OMAR KHAN
    Offering Manager
    IBM
    ------------------------------



  • 4.  RE: Slack Integration: Failed while trying to Authenticate

    Posted 12/19/18 06:31 PM
    Hi Mohammed,

    The collaboration functionality is quiet good, user can share each others with their familiar tools, but actually it seems that Cognos only support slack, if I want to add other OAuth based tool, how could I do that? If there are any documents on this topic please share with us. 

    Thanks very much

    ------------------------------
    Tom Z
    ------------------------------



  • 5.  RE: Slack Integration: Failed while trying to Authenticate

    Posted 12/20/18 04:22 AM
    Hi Mohammed,

    I checked your 4 points (again and again) and I am pretty sure I set them correct. From the Slack side, it also seems to work, as I can grant myself access to the app (see screenshots attached).

    What I can add as information is that in the network tab in my debug window, after the Oauth Slack window closes itself, I see a DELETE call that looks like:

    https://srv06.gologic.eu/ibmcognos/bi/v1/collaboration/config/providers/longobjectID

    Which returns: {"count":2}

    and then a get:

    https://srv06.gologic.eu/ibmcognos/bi/v1/notifications?unread-only=true&max=20&offset=0

    Which returns an empty array.

    Regards,

    Reinier

    PS, if you want to join the slack group to see for yourself, let me know. It's for testing/demo purposes anyways.

    ------------------------------
    Reinier Battenberg
    ------------------------------



  • 6.  RE: Slack Integration: Failed while trying to Authenticate

    Posted 12/21/18 01:29 PM
    Hi Reinier,

    Thanks for confirming that it worked for a completely fresh user. The original user's token object was apparently broken or not found.



    ------------------------------
    SULIAN LIU
    ------------------------------



  • 7.  RE: Slack Integration: Failed while trying to Authenticate

    Posted 06/02/20 09:22 PM
    Hi,

    I am trying to integrate CA 11.1.6 with Slack. But having an issue when testing. The message "Invalid SSL certificate" shows up. SSL certificate seem valid & fine.

    I tested on a another server and the same message. Any ideas? Thanks in advance.

    Sheran

    ------------------------------
    Sheran Hettiarachchi
    ------------------------------



  • 8.  RE: Slack Integration: Failed while trying to Authenticate

    Posted 06/03/20 07:16 PM
    Hi @Sheran Hettiarachchi,

    Are you able to see the pop-up window Reinier​ posted an image of above?

    ------------------------------
    MOHAMMED OMAR KHAN
    Offering Manager
    IBM Cognos Analytics
    ------------------------------



  • 9.  RE: Slack Integration: Failed while trying to Authenticate

    Posted 06/03/20 07:22 PM
    Hi Mohammed,

    Thanks for the reply.

    No I do not get pop-up windows. See below screenshot.

    slack int warning
    Thanks!
    Sheran


    ------------------------------
    Sheran Hettiarachchi
    ------------------------------



  • 10.  RE: Slack Integration: Failed while trying to Authenticate

    Posted 06/03/20 09:24 PM
    That might explain why you are seeing that error as you weren't able to authenticate with Slack just yet. It's very likely your browser is blocking the pop-up window when you click Test.

    Please try unblocking the pop-up window in your browser. You will see a screen similar to what Reinier posted in the pop-up window.

    ------------------------------
    MOHAMMED OMAR KHAN
    Offering Manager
    IBM Cognos Analytics
    ------------------------------



  • 11.  RE: Slack Integration: Failed while trying to Authenticate

    Posted 06/09/20 03:20 AM
    Thanks Mohammed.

    I managed to get CA & Slack integration working by configuring on another Cognos server.

    Sheran

    ------------------------------
    Sheran Hettiarachchi
    ------------------------------



  • 12.  RE: Slack Integration: Failed while trying to Authenticate

    Posted 12/24/18 10:03 AM
    ​I've had a similar problem, unable to connect to Workspace, and I've tried many forms of URI and or names.
    I've installed the Slack app on my PC, but do we have to install the app actually on the Cognos server(s) themselves?
    Thanks

    ------------------------------
    Adrian Webster
    ------------------------------



  • 13.  RE: Slack Integration: Failed while trying to Authenticate

    Posted 12/24/18 11:43 AM
    Hi Adrian,

    As Sulian mentioned before, together with IBM we investigated and found the reason for the error. Somehow the token of the user with whom you are testing the integration becomes invalid. You can not fix this, the only workaround for now is to use a fresh user and connect the app using that one. The account with the invalid token will not be able to use the slack integration (I presume there will be a fix for this eventually).
    You do not need to install anything server-side, nor do you need the slack client installed. The documentation is 100% correct and quite easy to follow, except for this bug that occurs for some users.

    Merry Christmas from Europe,

    Reinier


    ------------------------------
    Reinier Battenberg
    ------------------------------