Unsubscribing user using Web services

Natali shared this problem 7 years ago
Defect Fixed

Hi,


I am trying to use the UNSUBSCRIBE function from the Report Service (http://wiki.yellowfin.com.au/display/USER72/Report+Service) but the problem is my request fails and I get status code 25 - COULD_NOT_AUTHENTICATE_USER. It occured to me today to use the password of the user I am trying to unsubscribe as well (along with his e-mail/userId) and that seems to work.

But isn't that a bit unnecessary?

Since the assumption is that the user/account that is used for making API calls i.e. that is using web services is an admin and that he doesn't need to know the user's password since he is in charge of system and user administration.


Another way is to retrieve somehow the user's password using the Web services but I think that is not recommended or secure.


Thank you for your help!

Best Answer
photo

Hi,


thanks for the update. Hopefully everything will go as planned and we will use the UNSUBSCRIBE function succesfully after the November release.


However, I had a chance to test that function on a running 7.1 instance of YellowFin and I get an error again. This time I get an error with status code 2 (NO_WEBSERVICE_ACCESS - Error code indicating the

user does not have access to web services).


But the web services are enabled (see attached image) and when I check http://<yellowfin-server>:<port>/services all services are listed there.

This happens only with the ReportService (I tried it with multiple functions - SCHEMA, RESULTSET, ...) and everytime it's the same - FAILURE with status code 2; the AdministrationService works like a charm.


Is there something else I need to enable? Maybe something that I forgot...

When you tested on your 7.1 version of YellowFin everything worked fine?


Looking forward to your response,


Natali

Replies (12)

photo
1

Hi Natali,


I'm sorry to hear that you are running into troubles with the UNSUBSCRIBE report service. The only credentials that should be required here are the userid/password of the user running the web service, and not the credentials of the user you are trying to unsubscribe.


Do you think you might be willing to attach an excerpt of your web service call so that we can take a look to see what you are doing first hand? Hopefully we can figure out a solution for you.


Kind Regards,


Dustin

photo
1

This is my call:


  1. soap.createClient(URLforWSDL, function (err, client) {
  2. client.ReportServiceService.ReportService.remoteReportCall(
  3. {
  4. ReportServiceRequest: {
  5. reportRequest: 'UNSUBSCRIBE',
  6. loginId: ADMIN,
  7. orgId: 1,
  8. password: ADMINPASS,
  9. reportId: REPORTID,
  10. reportUserId: USERID (his email),
  11. }
  12. }, function (err, response) {
  13. if (err) {
  14. console.log(err);
  15. }
  16. console.log(null, response);
  17. });
  18. });


I am calling the web services through a nodejs app, using the soap npm package.

And here is the response I get:


  1. { attributes: { 'soapenv:encodingStyle': 'http://schemas.xmlsoap.org/soap/encoding/' },
  2. remoteReportCallReturn:
  3. { attributes:
  4. { id: 'id0',
  5. 'soapenc:root': '0',
  6. 'soapenv:encodingStyle': 'http://schemas.xmlsoap.org/soap/encoding/',
  7. 'xsi:type': 'ns2:ReportServiceResponse' },
  8. canDrill: { attributes: [Object], '$value': 'false' },
  9. canSubscribeToReport: { attributes: [Object], '$value': 'false' },
  10. dashboardEnabled: { attributes: [Object], '$value': 'false' },
  11. errorCode: { attributes: [Object], '$value': '25' },
  12. statusCode: { attributes: [Object], '$value': 'FAILURE' },
  13. storyboardDescriptors: { attributes: [Object] } } }

photo
1

Hi Natali,


Thanks for sending the example through. Let me check with our development team to see if they can assist here.


Kind Regards,


Dustin

photo
1

Ok, great.

Let me know as soon as you find out something.


Thanks for your help!

photo
1

Hi Natali,


Ok so we have tested the attached .jsp in both 7.1 and 7.2, and can confirm we also get the 'user not authenticated' in 7.2 only.

It seems to work fine in 7.1.


This has been logged as a defect #240443 and will keep you posted on updates.

If all goes to plan it will be fixed in time for the November 7.2 release.


Please let me know if I have missed anything.


Thanks,

David

photo
1

Hi,


thanks for the update. Hopefully everything will go as planned and we will use the UNSUBSCRIBE function succesfully after the November release.


However, I had a chance to test that function on a running 7.1 instance of YellowFin and I get an error again. This time I get an error with status code 2 (NO_WEBSERVICE_ACCESS - Error code indicating the

user does not have access to web services).


But the web services are enabled (see attached image) and when I check http://<yellowfin-server>:<port>/services all services are listed there.

This happens only with the ReportService (I tried it with multiple functions - SCHEMA, RESULTSET, ...) and everytime it's the same - FAILURE with status code 2; the AdministrationService works like a charm.


Is there something else I need to enable? Maybe something that I forgot...

When you tested on your 7.1 version of YellowFin everything worked fine?


Looking forward to your response,


Natali

photo
1

Are there any news or updates for this?


Thanks,

Natali

photo
1

Hi Natali,


Apologies for the delayed response on this one, hopefully I can make up for it with some good news! The development team has completed work on the defect, and it has now been submitted for testing. Assuming that everything goes as planned, this should be included in the November release. Please let me know if you have any additional questions here, or if there is anything else that we can do for you from Support.


Thanks!

-Conner

photo
1

Hello,


We saw in the change log for the new relase "Users can be unsubscribed from a report through webservices without report user authentication" so I guess that refers to our discussion here. Thanks for that! I will test it as soon as I can.


I have another question, the topic is similar to this one, so I will post it here: Is there a function that returns all reports the user is subscribed to?

I know about the "GETALLUSERREPORT" but that function return all the reports the specific user is allowed to see - I want just the reports he is subscribed to. I don't know if that exists?


Thanks!


Bye,

Natali

photo
1

Hi Natali,


Just doing some overdue cleanup here. Can I trust that things are running smoothly now? Thanks!


-Conner

photo
1

Yes, I think it is solved now.

photo
1

Natali,


Thanks for the update! I'm going to mark this as fixed and resolved.


Best,

-Conner

Leave a Comment
 
Attach a file