question

Upvotes
Accepted
3 0 0 3

Refinitiv Data Library for .NET with CIAM

We are currently using the Refinitiv Data Library for .NET for streaming data. Authentication is performed using ApplicationKey, MachineID, and Password. The login process is outlined at https://github.com/LSEG-API-Samples/Example.DataLibrary.DotNet, as follows:


"rdpSession": {

"rdp-credentials": {

"app-key": "<Application Key>",

"password-grant": {

"machine-id": "<RDP Machine ID>",

"password": "<RDP Password>"

}

}

}

Like in the example, we use the Refinitiv.Data nuget package.


We need to transition to using Customer Identity and Access Management (CIAM) for authentication.


Could you please inform us what changes are necessary in the settings or application to operate with this new type of login? I should have the Service ID and Password available; what modifications need to be made to the application?


Thank you.

#technologyc#.netrefinitiv-data-librariesciam
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvote
Accepted
19k 85 39 63

Hi @nerusilj,

Your code looks correct and the library is responding correctly based on the discovery results. This is because your ID does not grant you permissions to retrieve any streaming URLs thus can’t connect to any streaming servers. As I mentioned before, you have to report that ID given to you is not properly setup to permission for streaming market data.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvote
19k 85 39 63

Hi @nerusilj

To support v2 authentication (CIAM), these are the necessary changes.

Via code:

var credentials = new ClientCredentials().ClientID(<ciam id>)
                                         .ClientSecret(<ciam passwd>);
var session = PlatformSession.Definition().OAuthGrantType(credentials)
                                          .GetSession();
var session.Open();

Via configuration:

"rdp-credentials": 
    "client-credentials": {
       "client-id": "<ciam id>",
       "client-secret": "<ciam passwd>"
    }
}


icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Thanks for the advice.

The connection was successful.

Now I have a problem with permissions.

I assume this is not a connection issue but a matter of account settings.


2024-04-22 15:11:33.5477|Info|Refinitiv.Data.Core.PlatformStreamDiscovery|17|Streaming service: [custom-instruments] unavailable. Insufficient permissions for endpoint: [https://api.refinitiv.com/streaming/custom-instruments/v1/resource]
2024-04-22 15:11:33.5477|Info|Refinitiv.Data.Core.PlatformStreamDiscovery|20|Streaming service: [benchmark] unavailable. Insufficient permissions for endpoint: [https://api.refinitiv.com/streaming/benchmark/v1/resource]
2024-04-22 15:11:33.5477|Info|Refinitiv.Data.Core.PlatformStreamDiscovery|20|Streaming service: [pricing] unavailable. Insufficient permissions for endpoint: [https://api.refinitiv.com/streaming/pricing/v1/?dataformat=tr_json2]
2024-04-22 15:11:33.5597|Info|Refinitiv.Data.Core.PlatformStreamDiscovery|20|Streaming service: [quantitative-analytics] unavailable. Insufficient permissions for endpoint: [https://api.refinitiv.com/streaming/quantitative-analytics/beta1/financial-contracts]

Thanks

Hi @nerusilj

The message that refers to "/streaming/pricing/v1/..." indicates you do not have permissions to access streaming market data for your new ID. This is a little surprising given the CIAM IDs should be specifically targeted for only streaming market data. So you may need to confirm what specifically the ID provided to you is supposed to be permissioned for.

Upvotes
3 0 0 3

Hello,

I still have a isues with the implementation of streaming services in my code and would appreciate your assistance to review and identify the problem. Here is the code where I am setting up the client credentials and initiating the stream:

var credentials = new ClientCredentials()
           .ClientID(<ciam id>)
           .ClientSecret(<ciam passwd>);
        
var session = PlatformSession.Definition().OAuthGrantType(credentials)
            .GetSession();
        
session.Open();
        
var stream = OMMStream.Definition("GBP=")
            .Fields("ASK", "BID")
            .GetStream(session)
            .OnRefresh((item, msg, _) => Console.WriteLine(msg))
            .OnUpdate((item, msg, _) => Console.WriteLine(msg))
            .OnError((item, err, _) => Console.WriteLine(err))
            .OnStatus((item, msg, _) => Console.WriteLine(msg));
            
stream.Open();

Session opening is fine, but I receive an error when attempting to open the stream:

{
    Error: "Failed to open OMM stream - streaming services are unavailable. Verify log details and ensure you have permissions."
}

Here is the complete log:

2024-04-25 14:22:04.3454|Info|Refinitiv.Data.Log|10|Registering log system
2024-04-25 14:22:04.3555|Info|Refinitiv.Data.Initializer|10|Library version: 1.0.0-beta5
2024-04-25 14:22:04.3555|Info|Refinitiv.Data.Initializer|10|.Net runtime: 8.0.2
2024-04-25 14:22:04.3555|Info|Refinitiv.Data.Initializer|10|.Net version: 8.0.2+1381d5ebd2ab1f292848d5b19b80cf71ac332508
2024-04-25 14:22:04.4723|Info|Refinitiv.Data.Core.DataLibraryConfig|10|Successfully loaded the Stream:[internal] configuration database.
2024-04-25 14:22:05.1816|Info|Refinitiv.Data.Core.PlatformSessionCore|10|PlatformSession (Cloud) Session State transitioned from Closed to Pending
2024-04-25 14:22:06.0919|Info|Refinitiv.Data.Core.GrantRefresh|20|PlatformSession (Cloud) successfully authenticated
2024-04-25 14:22:06.0919|Info|Refinitiv.Data.Core.PlatformStreamDiscovery|20|******************** Platform streaming services -- Discovery Initiated *****************************
2024-04-25 14:22:06.3490|Info|Refinitiv.Data.Core.PlatformStreamDiscovery|16|Streaming service: [pricing] unavailable. Insufficient permissions for endpoint: [https://api.refinitiv.com/streaming/pricing/v1/?dataformat=tr_json2]
2024-04-25 14:22:06.3654|Info|Refinitiv.Data.Core.PlatformStreamDiscovery|16|Streaming service: [custom-instruments] unavailable. Insufficient permissions for endpoint: [https://api.refinitiv.com/streaming/custom-instruments/v1/resource]
2024-04-25 14:22:06.3654|Info|Refinitiv.Data.Core.PlatformStreamDiscovery|16|Streaming service: [benchmark] unavailable. Insufficient permissions for endpoint: [https://api.refinitiv.com/streaming/benchmark/v1/resource]
2024-04-25 14:22:06.3777|Info|Refinitiv.Data.Core.PlatformStreamDiscovery|16|Streaming service: [quantitative-analytics] unavailable. Insufficient permissions for endpoint: [https://api.refinitiv.com/streaming/quantitative-analytics/beta1/financial-contracts]
2024-04-25 14:22:06.3777|Info|Refinitiv.Data.Core.PlatformStreamDiscovery|16|******************** Platform streaming services -- Discovery Completed *****************************
2024-04-25 14:22:06.3777|Info|Refinitiv.Data.Core.PlatformSessionCore|16|PlatformSession (Cloud) Session State transitioned from Pending to Opened
2024-04-25 14:22:08.6220|Warn|Refinitiv.Data.Core.PlatformSessionCore|10|Unable to retrieve Platform streaming connection details. The API service reference: [pricing] not defined.
2024-04-25 14:22:08.6220|Warn|Refinitiv.Data.Delivery.Stream.OMMItemStream|10|OMMItemStream: Failed to open OMM stream - streaming services are unavailable.

Could you please advise what might be causing the error?

Thank you in advance for your help.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.