dcblogdev / laravel-microsoft-graph

Laravel package for Microsoft Graph API (Microsoft365)
https://dcblog.dev/docs/laravel-microsoft-graph
Other
120 stars 51 forks source link

urlResourceOwnerDetails is not visible in config file #67

Closed Pamposgsk closed 9 months ago

Pamposgsk commented 9 months ago

Hi I am trying to extend the functionality of this great package in order to able to use more resources e.g to be able to call MsGraph::get('me/sites'). In MsGraph.php in getProviders function there is a reference in urlResourceOwnerDetails inside config file but is not visible. Could you pls help. Is there any possibility to include sites in your resources as well? Thanks

dcblogdev commented 9 months ago

I see this is missing from the config, looking at M365 docs there's no mention of urlResourceOwnerDetails.

I've checked it there only as its a required option for https://oauth2-client.thephpleague.com/usage/

you can add this to your config:

'urlResourceOwnerDetails' => 'https://login.microsoftonline.com/'.env('MSGRAPH_TENANT_ID', 'common').'/oauth2/v2.0/resource',

but I don't think its used at all.

dcblogdev commented 9 months ago

Is there any possibility to include sites in your resources as well?

yes I want to add more resources