CmlLib
English (v4)
English (v4)
  • 🧊CmlLib Projects
  • 🚀CmlLib.Core
    • Home
    • Getting Started
      • Minecraft Launcher
      • Minecraft Path
      • Versions
      • Launch Options
      • Event Handling
    • Login and Sessions
      • Microsoft Xbox Account
      • Offline Account
    • More APIs
      • MinecraftLauncherParameters
      • Rules
      • FileExtractor
      • GameInstaller
      • Java
    • Mod Loader Installers
      • Forge Installer
      • Fabric Installer
      • Quilt Installer
      • LiteLoader Installer
    • Utilities
      • Minecraft Changelogs
    • Resources
      • FAQ
      • Known Issues
      • Sample Launcher
      • License
  • 🔓Auth.Microsoft
    • Home
    • CmlLib.Core.Auth.Microsoft
      • JELoginHandler
      • JELoginHandlerBuilder
      • JEAuthenticator
      • Authentication with MSAL
    • XboxAuthNet.Game
      • OAuth
      • XboxAuth
      • XboxAuthException
      • AccountManager
      • Accounts
    • XboxAuthNet.Game.Msal
      • ClientID
      • MsalClientHelper
      • OAuth
    • CmlLib.Core.Bedrock.Auth
    • Resources
  • 🌐MojangAPI
    • Home
    • Mojang API
    • SecurityQuestion
  • ⚒️Installer.Forge
    • Home
    • Supported Versions
    • Getting Started
    • MForge
    • ForgeVersionLoader
Powered by GitBook
On this page
  • Example
  • CreateDefaultApplicationBuilder(string cid)
  • RegisterCache(IPublicClientApplication app, MsalCacheSettings cacheSettings)
  • RegisterCache(IPublicClientApplication app, StorageCreationProperties storageProperties)
  • BuildApplication(string cid)
  • BuildApplicationWithCache(string cid)
  • BuildApplicationWithCache(string cid, MsalCacheSettings cacheSettings)
  • BuildApplicationWithCache(string cid, StorageCreationProperties storageProperties)
  • ToMicrosoftOAuthResponse(AuthenticationResult result)
Edit on GitHub
  1. Auth.Microsoft
  2. XboxAuthNet.Game.Msal

MsalClientHelper

Provides helper methods for initializing IPublicClientApplication.

Example

using XboxAuthNet.Game.Msal;

IPublicClientApplication app = await MsalClientHelper.BuildApplicationWithCache("<CLIENT-ID>");

Fill your Azure App Id in <CLIENT-ID>. For more information, see the ClientID.

CreateDefaultApplicationBuilder(string cid)

Initializing a PublicClientApplicationBuilder instance set up for Xbox authentication.

RegisterCache(IPublicClientApplication app, MsalCacheSettings cacheSettings)

Apply the cache settings object, cacheSettings, to app.

RegisterCache(IPublicClientApplication app, StorageCreationProperties storageProperties)

Apply the cache settings object storageProperties to app.

BuildApplication(string cid)

Initializing an IPublicClientApplication set up for Xbox authentication.

BuildApplicationWithCache(string cid)

Initializing an IPublicClientApplication set up for Xbox authentication and returns it with the default account cache settings applied.

The default cache settings are:

BuildApplicationWithCache(string cid, MsalCacheSettings cacheSettings)

Initializing an IPublicClientApplication set up for Xbox authentication, applies the cache settings, cacheSettings, and returns it.

BuildApplicationWithCache(string cid, StorageCreationProperties storageProperties)

Create an IPublicClientApplication set up for Xbox authentication and return it with the cache settings, storageProperties.

ToMicrosoftOAuthResponse(AuthenticationResult result)

Convert the MSAL login result, AuthenticationResult, to a MicrosoftOAuthResponse object used by XboxAuthNet.

PreviousClientIDNextOAuth

Last updated 10 months ago

🔓