Docs Menu

Connect to a MongoDB Realm Backend App - .NET SDK

On this page

  • Access the App Client
  • Configuration

The Realm app client is the interface to the MongoDB Realm backend. It provides access to the authentication functionality, functions, and sync management.

Pass the Realm app ID for your Realm app, which you can find in the Realm UI.

var myRealmAppId = "<your_app_id>";
var app = App.Create(myRealmAppId);

For granular control of your app connection, such as custom timeouts for connections and the log level, you can pass an AppConfiguration object to the App.Create() method. The following example sets the LogLevel and the request timeout:

var appConfig = new AppConfiguration(myRealmAppId)
//LogLevel = LogLevel.Debug,
DefaultRequestTimeout = TimeSpan.FromMilliseconds(1500)
app = App.Create(appConfig);

For most use cases, you only need your application's App ID to connect to MongoDB Realm. The other settings demonstrated here are optional.

←  Modify an Object Schema - .NET SDKAuthenticate Users - .NET SDK →
Give Feedback
© 2022 MongoDB, Inc.


  • Careers
  • Investor Relations
  • Legal Notices
  • Privacy Notices
  • Security Information
  • Trust Center
© 2022 MongoDB, Inc.