Skip to main content
October 13, 2025
Solved

Finding a user connection type in Business Rules

  • October 13, 2025
  • 1 reply
  • 0 views

Hello,

We are trying to find the best way to determine if a user is using web-based or Windows App OneStream environments to customize a dashboard experience. For now, we are using the si.WebServerURLByClient to determine this which works but seems a bit clunky. Is there a better call to determine which environment a user is in? Thanks in advance.

Brett

Best answer by sameburn

Hi bsalamone​ 

You can use the ClientModuleType property from SessionInfo to check this e.g. something like this C# example

public bool CheckOneStreamClientModuleTypeIsWeb(SessionInfo si)
{			
	switch (si.ClientModuleType)
	{
		case ClientModuleType.Web:
		case ClientModuleType.WebPhone:
		case ClientModuleType.WebTablet:
			return true;
		default:
			return false;
	}					
}

Hope this helps

Sam

1 reply

sameburnAnswer
October 13, 2025

Hi bsalamone​ 

You can use the ClientModuleType property from SessionInfo to check this e.g. something like this C# example

public bool CheckOneStreamClientModuleTypeIsWeb(SessionInfo si)
{			
	switch (si.ClientModuleType)
	{
		case ClientModuleType.Web:
		case ClientModuleType.WebPhone:
		case ClientModuleType.WebTablet:
			return true;
		default:
			return false;
	}					
}

Hope this helps

Sam

bsalamoneAuthor
October 13, 2025

Thank you Sam. This worked and is a much cleaner way to get to the answer.

Brett