Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Class 'Microsoft\Graph\Graph' not found - Laravel #1572

Open
cslater77 opened this issue Aug 30, 2024 · 1 comment
Open

Class 'Microsoft\Graph\Graph' not found - Laravel #1572

cslater77 opened this issue Aug 30, 2024 · 1 comment
Labels
type:question An issue that's a question

Comments

@cslater77
Copy link

cslater77 commented Aug 30, 2024

Describe the bug

I am trying to use the Microsoft SDK via Composer for my website project. I have a Transport controller that lists

Use Microsoft\Graph\Graph;

However I am getting the error Class "Use Microsoft\Graph\Graph" not found.

I have installed version microsoft\microsoft-graph version 2.12.0 and microsoft\microsoft-graph-core version 2.2.0

Expected behavior

I would be expecting when using this command, that it is being registered via the mail controller/ transporter

How do I resolve this?

SDK Version

2.12.0

@cslater77 cslater77 added status:waiting-for-triage An issue that is yet to be reviewed or assigned type:bug A broken experience labels Aug 30, 2024
@Ndiritu
Copy link
Contributor

Ndiritu commented Sep 3, 2024

Thanks for reporting this @cslater77.

Microsoft Graph version 2.x initialises a GraphServiceClient that is imported under this namespace

use Microsoft\Graph\GraphServiceClient;

Microsoft\Graph\Graph exists in the 1.x versions of this package. You'll need to install our latest 1.x version for that code to work.

Is this Transport controller part of an open source Laravel project/template? If so, please share & we can collaborate to update its code to use version 2.x of this SDK

@Ndiritu Ndiritu added type:question An issue that's a question and removed status:waiting-for-triage An issue that is yet to be reviewed or assigned type:bug A broken experience labels Sep 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:question An issue that's a question
Projects
None yet
Development

No branches or pull requests

2 participants