chrisreedio/laravel-azure-graph

Provides an interface to the Azure Graph

v0.3.0 2024-11-05 19:08 UTC

README

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

Provides an interface to the Azure Graph API.

Warning

This package is still in development and is not ready for production use.

It currently only supports delegated authentication via a user supplied token.

The only call supported is to fetch a user's groups via the memberOf endpoint.

Installation

You can install the package via composer:

composer require chrisreedio/laravel-azure-graph

Usage

This sample shows how to get all of a user's groups via a delegated call to the memberOf endpoint.

$graph = new GraphConnector('user-token');
$paginator = $graph->paginate(new MemberOfRequest());
$adGroups = $paginator->collect();

// Dump the user's groups
dd($adGroups->pluck('displayName')->all());

Config

You can publish the config file with:

php artisan vendor:publish --tag="laravel-azure-graph-config"

This is the contents of the published config file:

return [
    'pagination' => [
        'limit' => 100,
    ],
];

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.