I am trying setup RStudio Workbench to use Azure SAML but its not working. Getting mentioned error

30 Nov 2021 09:23:02 [rserver] ERROR system error 2 (No such file or directory) [description: User not found., user-value: swapnil@altidata42.onmicrosoft.com]; OCCURRED AT rstudio::core::Error rstudio::core::system::User::Impl::populateUser(rstudio::core::system::User::Impl::GetPasswdFunc&, T) [with T = const char* rstudio::core::system::User::Impl::GetPasswdFunc = std::function<int(const char*, passwd*, char*, long unsigned int, passwd**)>] src/cpp/shared_core/system/User.cpp:68; LOGGED FROM: bool rstudio::server::auth::validateUser(const string&, const string&, unsigned int, bool) src/cpp/server/auth/ServerValidateUser.cpp:51
30 Nov 2021 09:23:02 [rserver] WARNING Event auth_login_failed username was truncated; LOGGED FROM: rstudio::monitor::Event::Event(int, int, const string&, const string&, PidType, rstudio_boost::posix_time::ptime) src/cpp/monitor/events/Event.cpp:44

Does a user with username swapnil@altidata42.onmicrosoft.com exist on your system? With SSO integration in RStudio Workbench you still have to make sure that the relevant users exist. Either by creating them manually or by integrating with some sort of directory service, c.f. RStudio Workbench Administration Guide – SAML Single Sign-On Authentication PRO. If manual creation is not possible for you, you could look into Azure Active Directory Domain Services | Microsoft Azure.

DO u have steps to replicate users from Azure AD to system? U mean first we need to domain join the server and have the users sync from AD and then setup SAML?

With a "classical" AD system one would typically join the realm (see RHEL and Ubuntu instructions) to sync users from AD to Linux. Azure AD does not provide the necessary interface for this, though. However, Azure Active Directory Domain Services | Microsoft Azure should add such an interface. I have not tested that in detail, though,

Yeah... We are having server in AWS so may be we need to enable trust between Azure AD and AWS to make it happen.