Graph-based directory services
Directory services that store identity data as nodes and edges for fast relationship queries.
What is Graph-based directory services?
Graph-based Directory Services store identity data as a network of connected objects (nodes) with relationships (edges). Unlike traditional LDAP directories (hierarchical), graph databases excel at relationship queries.
Key concepts:
- Nodes: Objects like users, groups, devices, applications
- Edges: Relationships like 'member of', 'reports to', 'owns'
- Properties: Attributes on nodes/edges (name, email, department)
Examples:
- Microsoft Graph: Azure AD, Office 365 identity data exposed via Graph API
- Facebook Graph: Social connections, likes, posts
- Neo4j: Open-source graph database
Graph databases can answer multi-hop relationship queries in milliseconds (e.g., 'find all users who report to managers in the Sales department').
Analogy
Think of graph-based directory like a social network map. Instead of separate tables (users, friends), everything is connected: User A → follows → User B → likes → Post C. You can instantly answer 'Who are User A's friends who also like Post C?' - relationships are first-class citizens.
Types and Use Cases
- "Azure AD / Microsoft Graph: Query user → manager → department → resources"
- "CIAM: Find users who share similar attributes/preferences"
- "B2B IAM: Traverse partner → partner users → accessible resources"
- "Recommendation engines: Users who bought X also bought Y"
How it Works
// Microsoft Graph API Example
GET https://graph.microsoft.com/v1.0/users
Authorization: Bearer <token>
{
"$select": "displayName,department,manager",
"$expand": "manager($select=displayName)"
}
// Response: User with manager relationship
{
"displayName": "John Doe",
"department": "Sales",
"manager": {
"displayName": "Jane Smith"
}
}
// Graph Query: Find users reporting to Sales managers
GET /users?$filter=manager/department eq 'Sales'Graph-based directory services vs LDAP-based Directories (Active Directory)
Graph-based directory services
LDAP-based Directories (Active Directory)
Graph-based excels at relationship queries (multi-hop traversals)
LDAP is hierarchical (tree structure)
Graph uses REST APIs (JSON)
LDAP uses proprietary protocol (BER encoding)
Graph can answer 'friends of friends''
LDAP requires multiple queries to traverse relationships
Best Practices for Graph-based directory services
- "Use Graph APIs for relationships: Query 'manager's manager' in one call instead of multiple LDAP lookups"
- "Cache frequent queries: Graph traversals can be expensive - cache common relationship paths"
- "Combine with LDAP: Use Graph for relationship queries, LDAP for authentication"
How LoginRadius Powers Graph-based directory services
LoginRadius CIAM platform provides RESTful APIs for identity queries with relationship support: find users by groups, filter by custom attributes, and traverse user relationships (social connections, referrers). Our platform integrates with Microsoft Graph / Azure AD via SCIM and OIDC for organizations using hybrid directory models. LoginRadius also provides Graph-like query APIs for custom user relationships and detailed identity analytics.
Resources
FAQs
Graph-based stores data as interconnected nodes/edges (network) - optimized for relationship queries. LDAP (Active Directory) stores data hierarchically (tree) - optimized for authentication and single-hop lookups. Graph answers 'find all users who report to Sales managers' in one query; LDAP requires multiple lookups.
Microsoft Graph is the unified API for Microsoft 365 services (Azure AD, Office 365, Intune). It exposes identity data (users, groups, devices) as a graph. You can query: 'get user's manager', 'find all users in department', 'list group members' - all via REST API with JSON responses.
LoginRadius provides RESTful APIs for identity queries (similar to Graph concepts). While not a graph database internally, our APIs allow: (1) User relationships - find social connections, (2) Group memberships - query users in specific groups, (3) Custom queries - filter users by multiple attributes. LoginRadius also integrates with Azure AD / Microsoft Graph via SCIM/OIDC for hybrid scenarios.