{"id":20940046,"url":"https://github.com/natpnk/microsoft-graph-laravel","last_synced_at":"2025-06-25T00:36:41.322Z","repository":{"id":57024022,"uuid":"362271517","full_name":"Natpnk/microsoft-graph-laravel","owner":"Natpnk","description":"Microsoft Graph wrapper and mail transporter for Laravel","archived":false,"fork":false,"pushed_at":"2025-01-06T21:16:25.000Z","size":54,"stargazers_count":3,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-20T12:17:02.839Z","etag":null,"topics":["api","composer","laravel","mail-transport","microsoft","office365","php","wrapper"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Natpnk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-04-27T22:45:10.000Z","updated_at":"2025-01-07T23:09:34.000Z","dependencies_parsed_at":"2025-01-06T21:24:39.655Z","dependency_job_id":"faa1ad2f-80f5-43eb-bfdc-56bf573f49f8","html_url":"https://github.com/Natpnk/microsoft-graph-laravel","commit_stats":{"total_commits":11,"total_committers":1,"mean_commits":11.0,"dds":0.0,"last_synced_commit":"74849f51aaf13e1183658dad7273fe5b12c483f3"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/Natpnk/microsoft-graph-laravel","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Natpnk%2Fmicrosoft-graph-laravel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Natpnk%2Fmicrosoft-graph-laravel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Natpnk%2Fmicrosoft-graph-laravel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Natpnk%2Fmicrosoft-graph-laravel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Natpnk","download_url":"https://codeload.github.com/Natpnk/microsoft-graph-laravel/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Natpnk%2Fmicrosoft-graph-laravel/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261782608,"owners_count":23208905,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","composer","laravel","mail-transport","microsoft","office365","php","wrapper"],"created_at":"2024-11-18T23:08:41.228Z","updated_at":"2025-06-25T00:36:41.287Z","avatar_url":"https://github.com/Natpnk.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Microsoft Graph for Laravel\n\nThis laravel package contains a wrapper for Microsoft Graph with the following features:\n\n - Microsoft Graph API calls\n - Mail transport\n\n## Requirements\n\n - Laravel 10 or higher (Use version 1.1.2 for Laravel 9)\n - PHP 8.2 or higher\n\n## Installation\nTo install and use this package follow instructions below:\n\n#### Step 1: Install via composer\n\n    $ composer require natpnk/microsoft-graph-laravel\n\n#### Step 2: Publish config\n\nRun the following to publish the config\n\n    $ php artisan vendor:publish --provider=\"Natpnk\\MicrosoftGraphLaravel\\MicrosoftGraphServiceProvider\" --tag=\"config\"\n\nThe config file will be published as follow:\n\n\t\u003c?php\n\n\treturn [\n\t   \n\t    /*    \n\t    |--------------------------------------------------------------------------    \n\t    | Microsoft Graph Laravel wrapper   \n\t    |--------------------------------------------------------------------------   \n\t    |    \n\t    */\n\t      \n\t    'tenant_id' =\u003e env('MSGRAPH_TENANT_ID'),\n\t    'client_id' =\u003e env('MSGRAPH_CLIENT_ID'),\n\t    'client_secret' =\u003e env('MSGRAPH_CLIENT_SECRET')    \n\t];\n\n#### Step 3: Create app registration\nTo obtain the Tenant, ClientID and ClientSecret. Please follow this [article](https://docs.microsoft.com/azure/active-directory/develop/quickstart-register-app) to generate a app registration within Azure.\n\n#### Step 4: Use Microsoft Graph as mail transport (Optional)\n\nIt is possible to use Microsoft Graph as an mail transport within Laravel. Add the following to config/mail.php inside your Laravel installation.\n\n    'microsoftgraph' =\u003e [\n\t\t'transport' =\u003e 'microsoft-graph',\n\t],\n\nAdditional settings are not required due to settings inside config/microsoftgraph.php. Remember to use a from address which is a valid mailbox inside your tenant.\n\n#### Step 5: Use Microsoft Graph as filesystem (Optional)\nIt is possible to use Microsoft Graph (OneDrive/ Sharepoint) as storage within Laravel. Add the following to config/filesystems.php inside your Laravel installation.\n\n    'disks' =\u003e [\n\n        'microsoft-graph' =\u003e [\n            'driver' =\u003e 'microsoft-graph',\n            'drive_id' =\u003e 'YOUR DRIVE ID'\n        ],  \n\nTo obtain the Drive ID. You can use the Microsoft Graph Explorer to produce a GET request to the following: \n\n\thttps://graph.microsoft.com/v1.0/sites/{SHAREPOINT_DOMAIN},{SITE_ID}/drives\n\nYou should also have set the Sites.ReadAll or Sites.ReadWriteAll permission based on your needs.\n\t\n##  Usage\nA basic example usage example get's all the users from a tentant:\n\n\tuse MicrosoftGraph;\n\t....\n        $Users = MicrosoftGraph::createRequest(\"GET\", \"/Users\")-\u003esetReturnType(\\Microsoft\\Graph\\Model\\User::class)-\u003eexecute();\n\n\tprint_r($Users);\n\nfor futher documentation about usage consult: [Microsoft Graph API docs](https://docs.microsoft.com/en-us/graph/overview)\n\n## Contributing\nFeel free contribute and send pull requests.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnatpnk%2Fmicrosoft-graph-laravel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnatpnk%2Fmicrosoft-graph-laravel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnatpnk%2Fmicrosoft-graph-laravel/lists"}