cancel
Showing results for 
Search instead for 
Did you mean: 

B1ServiceLayer - get user behind SSO login

mkraus92
Explorer
0 Kudos

Hi,

we are working in a CloudControlCenter environment. Now have to login with the SAP Business One SSO (Single Sign On) over Active Directory.

So for example we do following requests:

POST https://hana:50000/b1s/v1/Login

{
"UserName": "rz-nag\\02939106",
"Password": "Start123",
"CompanyDB": "C204651_01_DEMO_SYSONE" 
}

Now we are successfully logged in.

How can we get the SAP internal user for the ad-account "rz-nag\\02939106"?

GET https://hana:50000/b1s/v1/Users has no field for this reference...



Accepted Solutions (1)

Accepted Solutions (1)

former_member197733
Contributor
0 Kudos

From the Service Layer Metadata I understood you should be able to get the WindowsUser property from the UserActionRecord Collection.

I have no SSO or Cloud system ready to test it, but a

GET /b1s/v1/Users(1)

Gets me the UserActions with the WindowsUser

It's not great that this field is not easy accessible in the Object itself, but that is also the case for the DI API.

If this doesn't suits you, You can always use a view to have that field exposed.

Btw, I tested also

GET /b1s/v1/Users(1)/UserActionRecord

And got nothing. This IMHO is a bug ( I will talk to development about it) but really appreciate if you could report it as an incident as well

Simon_nAG
Explorer
0 Kudos

Hi Ralph,

thank you for the feedback. We tested UserActionRecord on CCC ServiceLayer environment and getting also an empty result.

{
    "odata.metadata": "https://xxxx:50000, xxxx.de:50000/b1s/v1/$metadata#Users/@Element",
    "UserActionRecord": []
}

We will open an incident and report again.

Kind Regards

Answers (1)

Answers (1)

Simon_nAG
Explorer
0 Kudos
{{B1ServiceLayerUrl}}/UsersService_GetCurrentUser