Microsoft Entra ID
Copy a setup prompt with the install steps and the full markdown guide for this plugin.
Overview
Section titled “Overview”Microsoft Entra ID is supported through:
- The
azureAuth Connect preset - Direct
oauth2configuration against Microsoft identity endpoints
Auth Connect preset example
Section titled “Auth Connect preset example”import { SocialLoginAuthConnect } from '@capgo/capacitor-social-login';
await SocialLoginAuthConnect.initialize({ authConnect: { azure: { tenantId: 'common', clientId: 'your-azure-client-id', redirectUrl: 'myapp://oauth/azure', }, },});
const result = await SocialLoginAuthConnect.login({ provider: 'azure',});Direct OAuth2 example
Section titled “Direct OAuth2 example”import { SocialLogin } from '@capgo/capacitor-social-login';
await SocialLogin.initialize({ oauth2: { azure: { appId: 'your-azure-client-id', authorizationBaseUrl: 'https://login.microsoftonline.com/common/oauth2/v2.0/authorize', accessTokenEndpoint: 'https://login.microsoftonline.com/common/oauth2/v2.0/token', redirectUrl: 'myapp://oauth/azure', scope: 'openid profile email User.Read', pkceEnabled: true, resourceUrl: 'https://graph.microsoft.com/v1.0/me', }, },});
const result = await SocialLogin.login({ provider: 'oauth2', options: { providerId: 'azure', },});- Replace
commonwith your tenant ID for single-tenant apps. resourceUrlcan point to Microsoft Graph when you want profile data immediately after login.
Related docs
Section titled “Related docs”Keep going from Microsoft Entra ID
Section titled “Keep going from Microsoft Entra ID”If you are using Microsoft Entra ID to plan authentication and account flows, connect it with Using @capgo/capacitor-social-login for the native capability in Using @capgo/capacitor-social-login, @capgo/capacitor-social-login for the implementation detail in @capgo/capacitor-social-login, @capgo/capacitor-passkey for the implementation detail in @capgo/capacitor-passkey, @capgo/capacitor-native-biometric for the implementation detail in @capgo/capacitor-native-biometric, and Two-factor authentication for the implementation detail in Two-factor authentication.