codebar-ag / laravel-microsoft-azure
Thin Azure and Microsoft 365 REST connector for Laravel (ARM, Key Vault, Graph, Kudu)
Package info
github.com/codebar-ag/laravel-microsoft-azure
pkg:composer/codebar-ag/laravel-microsoft-azure
Requires
- php: 8.4.*|8.5.*
- guzzlehttp/guzzle: ^7.11.1
- illuminate/contracts: ^13.0
- illuminate/support: ^13.0
- nesbot/carbon: ^3.11.4
- saloonphp/cache-plugin: ^3.1
- saloonphp/laravel-plugin: ^4.3.0
- saloonphp/rate-limit-plugin: ^2.0
- saloonphp/saloon: ^4.0
- spatie/laravel-data: ^4.0
- spatie/laravel-package-tools: ^1.93.1
Requires (Dev)
- larastan/larastan: ^3.10.0
- laravel/pint: ^1.29.1
- nunomaduro/collision: ^8.9.4
- orchestra/testbench: ^11.1.0
- pestphp/pest: ^4.7.2
- phpdocumentor/reflection-docblock: ^6.0
- phpstan/extension-installer: ^1.4.3
- phpstan/phpstan-deprecation-rules: ^2.0.4
- phpstan/phpstan-phpunit: ^2.0.16
- symfony/yaml: ^7.2|^8.0
README
Thin Azure and Microsoft 365 REST connector for Laravel — Saloon transport only, no business logic.
Why
One Azure facade with fluent, typed Resource gateways over 13 Azure/Microsoft 365 REST surfaces — ARM (incl. Logic Apps, API Management), Azure AI Foundry (control + data plane, dated and v1 OpenAI surfaces), Azure Functions (ARM + runtime), Key Vault, Microsoft Graph, Log Analytics (KQL), Storage Queue (data plane), and Kudu. No official microsoft/* SDK dependency — every call is a hand-written Saloon request against the documented REST API. It does not do orchestration: provisioning sequences, retry policy beyond Saloon's built-in retry, and idempotency across multiple calls belong in the consuming app. See Limitations for the full list of what's deliberately out of scope.
Requirements
| Supported | |
|---|---|
| PHP | 8.4.* or 8.5.* |
| Laravel | ^13.0 |
No legacy PHP or Laravel support. Details: docs/installation.md.
Install
composer require codebar-ag/laravel-microsoft-azure php artisan vendor:publish --tag=laravel-microsoft-azure-config
Service provider and Azure facade register automatically via Laravel package auto-discovery. Full steps and Azure prerequisites: docs/installation.md.
Configuration
MICROSOFT_AZURE_TENANT_ID= MICROSOFT_AZURE_CLIENT_ID= MICROSOFT_AZURE_CLIENT_SECRET= MICROSOFT_AZURE_SUBSCRIPTION_ID=
That's the minimum. The published config also supports multi-tenant connections, retry/rate-limit policy, cache driver, and debug capture — full reference (and a documented config-key drift you should know about): docs/configuration.md.
Quick start
use CodebarAg\MicrosoftAzure\Facades\Azure; Azure::instance()->resourceGroups($subscriptionId)->list(); Azure::instance()->vault('my-keyvault')->secrets()->get('my-secret');
Runnable end-to-end walkthrough: docs/quick-start.md.
Usage
One facade, chained fluent gateways per Azure service — every call returns a typed DTO or Collection, never a raw array:
Azure::instance()->vault('my-kv')->secrets()->set('webhook-token', $token); Azure::instance()->foundry('my-aif', 'my-prj')->responses()->create(['model' => 'gpt-5-mini', 'input' => 'Hello']);
Full surface catalog, one page per group:
- ARM core — subscriptions, resource groups, deployments, RBAC
- Key Vault
- Storage — accounts, blob containers, Storage Queue data plane
- SQL
- Foundry & Azure OpenAI
- Foundry Agent Service
- Logic Apps & API Management
- Functions & Web Apps — Functions, App Service, Kudu, managed identities
- Observability & cost — App Insights, Monitor, Log Analytics, Cost Management
- Microsoft Graph
Class-level reference: ENDPOINTS.md (curated catalog), docs/api-reference.md and docs/inventory-parity.md (auto-generated — regenerate with composer docs:api / composer inventory:parity after changing Requests, DTOs, or Resources).
Advanced usage
Multi-tenant connections, long-running-operation polling, pagination, retry and rate-limit tuning: docs/advanced.md.
Testing
Contributor-facing test suite, Saloon fixtures, and live-integration setup: docs/testing.md.
Troubleshooting
Error → cause → fix table for every exception this package throws: docs/troubleshooting.md.
Limitations
No business logic/orchestration, no DB migrations, no service health checks, no official SDK — full list: docs/limitations.md.
Contributing
composer test # offline unit + core tests composer analyse # PHPStan level 10 composer format # Pint
If your change touches Requests/, Data/, or Resources/, regenerate the generated docs before opening a PR — CI checks both are in sync:
composer docs:api composer inventory:parity
More detail on the test suite (fixtures, live integration tiers): docs/testing.md.
Support, license
- Issues & source: https://github.com/codebar-ag/laravel-microsoft-azure
- MIT, see LICENSE