microsoftgraph / microsoftgraph/msgraph-sdk-php
Using package in laravel
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 669
- Forks
- 150
- Avg merge
- 15h 21m
- Merged PRs (30d)
- 3
Description
Please help me, i'm confused
I have project using laravel and laravel socialite, i got access_token from laravel socialite. How to use that access_token in this package?
I use this method
$tokenRequestContext = new OnBehalfOfContext(
config("services.microsoft.tenant"),
config("services.microsoft.client_id"),
config("services.microsoft.client_secret"),
session()->get("microsoft_access_token"),
);
$graphServiceClient = new GraphServiceClient($tokenRequestContext);
$user = $graphServiceClient->me()->get()->wait();
dd($user);
why the process is very long, and the result is invalid grant? I have checked that all parameters (tenant id, client id, etc) are valid
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Review the shown OnBehalfOfContext construction and GraphServiceClient->me()->get() call, then verify whether the Laravel Socialite token is the token type this flow expects. Done means documenting or demonstrating the supported access-token flow and resolving the invalid-grant behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- laravel, php
- Domain
- api, authentication, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100