How Public and Confidential Client Applications work
masterThe SDK uses application builders to manage authentication configuration. Once built, these applications handle access token requests and automatic token refresh for you. You then pass these applications to a Graph client to make API calls.
There are two primary types of applications:
PublicClientApplication: Typically used for client-side applications where a client secret cannot be securely stored.ConfidentialClientApplication: Used for server-side applications that can securely store a client secret.
Passing either type to the Graph client enables automatic token management.
let confidential_client: ConfidentialClientApplication<ClientSecretCredential> = ...
let graph_client = Graph::from(confidential_client);