>>
Microsoft Entra OAuth Provider
Authenticate using Microsoft Entra OAuth provider.
Callback or Redirect URL pattern
https://example.com/api/{name}/oauth/callback/msft-entra
tssrc/payload.config.ts
            import { buildConfig } from "payload/config";
import { authPlugin } from "payload-auth-plugin";
import { MicrosoftEntraAuthProvider } from "payload-auth-plugin/providers";
export default buildConfig({
  // --- rest of the config
  plugins: [
    // --- rest of the plugins
    authPlugin({
      providers: [
        MicrosoftEntraAuthProvider({
          client_id: process.env.PROVIDER_CLIENT_ID as string,
          client_secret: process.env.PROVIDER_CLIENT_SECRET as string,
          tenant_id: process.env.MSFT_ENTRA_TENANT_ID as string,
        }),
      ],
    }),
  ],
});
        Args
- client_id:
 
Type: string
Description: client_id is a string generated by Microsoft Entra to identify your Payload app.
Optional: No.
ts
            {
  client_id: "";
}
        - client_secret:
 
Type: string
Description: client_secret is a private key generated by Microsoft Entra to authenticate your Payload app.
Optional: No.
ts
            {
  client_secret: "";
}
        - tenant_id:
 
Type: string
Description: tenant_id of the Microsoft Entra tenant.
Optional: No.
ts
            {
  tenant_id: "";
}
        - params:
 
Type: Record<string, string>
Description: params any additional parameters to pass to the IDP for authorization.
Optional: Yes.
ts
            {
  params: {
    // additional parameters
  }
}
        Returns
provider OIDCProviderConfig