PHPackages                             creode/business-central-oauth2 - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. creode/business-central-oauth2

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

creode/business-central-oauth2
==============================

A PHP package for seamless OAuth2 authentication with Microsoft Dynamics 365 Business Central, offering a streamlined integration and secure access to Business Central APIs.

1.1.0(2y ago)28.0k↓50%MITPHP

Since Dec 8Pushed 2y ago1 watchersCompare

[ Source](https://github.com/creode-modules/business-central-oauth2)[ Packagist](https://packagist.org/packages/creode/business-central-oauth2)[ RSS](/packages/creode-business-central-oauth2/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)Dependencies (1)Versions (5)Used By (0)

Business Central OAuth2 Client
==============================

[](#business-central-oauth2-client)

This package provides Microsoft Dynamics 365 Business Central OAuth 2.0 support for the PHP League's OAuth 2.0 Client.

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require creode/business-central-oauth2
```

Usage
-----

[](#usage)

To use this package, you must first configure it by setting the appropriate values in the configuration file. Once configured, you can use the package as follows:

```
use Creode\BusinessCentralOauth2\Providers\BusinessCentralProvider;

$provider = new BusinessCentralProvider([
    'clientId' => 'your-client-id',
    'clientSecret' => 'your-client-secret',
    'redirectUri' => 'your-redirect-uri',
    'urlAccessToken' => 'your-token-url',
]);

$accessToken = $provider->getAccessToken('client_credentials', [
    'scope' => 'your-scope',
]);

$request = $provider->getAuthenticatedRequest(
    'GET',
    'https://api.businesscentral.dynamics.com/v2.0/{tenantId}/{environmentName}/',
    $accessToken
);

$response = $provider->getParsedResponse($request);
```

Testing
-------

[](#testing)

To run the tests for this package, use the following command:

```
./vendor/bin/phpunit
```

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security
--------

[](#security)

If you discover any security-related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Creode](https://github.com/creode)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 75% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~3 days

Total

3

Last Release

881d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/8133041?v=4)[Creode](/maintainers/creode)[@creode](https://github.com/creode)

---

Top Contributors

[![jaymeh](https://avatars.githubusercontent.com/u/18261676?v=4)](https://github.com/jaymeh "jaymeh (12 commits)")[![creode-dev](https://avatars.githubusercontent.com/u/19706903?v=4)](https://github.com/creode-dev "creode-dev (4 commits)")

### Embed Badge

![Health badge](/badges/creode-business-central-oauth2/health.svg)

```
[![Health](https://phpackages.com/badges/creode-business-central-oauth2/health.svg)](https://phpackages.com/packages/creode-business-central-oauth2)
```

###  Alternatives

[league/oauth2-google

Google OAuth 2.0 Client Provider for The PHP League OAuth2-Client

41721.2M118](/packages/league-oauth2-google)[knpuniversity/oauth2-client-bundle

Integration with league/oauth2-client to provide services

83416.7M61](/packages/knpuniversity-oauth2-client-bundle)[thenetworg/oauth2-azure

Azure Active Directory OAuth 2.0 Client Provider for The PHP League OAuth2-Client

2509.6M48](/packages/thenetworg-oauth2-azure)[stevenmaguire/oauth2-keycloak

Keycloak OAuth 2.0 Client Provider for The PHP League OAuth2-Client

2275.9M27](/packages/stevenmaguire-oauth2-keycloak)[patrickbussmann/oauth2-apple

Sign in with Apple OAuth 2.0 Client Provider for The PHP League OAuth2-Client

1132.5M6](/packages/patrickbussmann-oauth2-apple)[microsoft/kiota-authentication-phpleague

Authentication provider for Kiota using the PHP League OAuth 2.0 client to authenticate against the Microsoft Identity platform

153.2M7](/packages/microsoft-kiota-authentication-phpleague)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
