php-connect-rest-sample | [ARCHIVED] Use Microsoft Graph to access a user’s Microsoft account data from within a php web appli | Azure library
kandi X-RAY | php-connect-rest-sample Summary
kandi X-RAY | php-connect-rest-sample Summary
[ARCHIVED] Use Microsoft Graph to access a user’s Microsoft account data from within a php web application. This sample gets OAuth tokens from the Azure AD v2.0 endpoint and uses REST calls directly to Microsoft Graph.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Send a welcome mail with the given token .
- Send a post request .
- Create a new user .
- Define the web routes .
- Check if the guard is valid .
- Create the password reset table .
- Schedule a schedule .
- Render the error page .
- Register plugin .
- Run seed the database .
php-connect-rest-sample Key Features
php-connect-rest-sample Examples and Code Snippets
Community Discussions
Trending Discussions on php-connect-rest-sample
QUESTION
I tried using the library from krizalys for an implementation to read and write files from OneDrive. It should work for business accounts but would be nice if it could also work for personal accounts.
Since I read that the Live SDK used in krizalys example will be offline soon (as mentioned here), I tried implementing Microsoft Graph instead.
I implemented two ways to get an access token at the moment, one with grant type password
(getAccessToken Method from this sample used) and one with client_credentials
(Like in the krizalys lib). Both seem to work and return an access_token
and refresh_token
, but when I try to make a request I get the message:
"InvalidAuthenticationToken [message] => Access token is empty"
The code for my request:
...ANSWER
Answered 2018-Jul-19 at 15:09You've registered your application in the v2 Endpoint (apps.dev.microsoft.com
) but the sample code you're using is for the v1 Endpoint. These are not interchangeable. Also, password
isn't a valid OAuth Grant for the v2 Endpoint (v2 supports authorization_code
, implicit
, and client_credentials
)
You need to obtain your token from the v2 Endpoint. You might find these articles helpful:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install php-connect-rest-sample
PHP requires the Visual C runtime (CRT). The Microsoft Visual C++ Redistributable for Visual Studio 2019 is suitable for all these PHP versions, see visualstudio.microsoft.com. You MUST download the x86 CRT for PHP x86 builds and the x64 CRT for PHP x64 builds. The CRT installer supports the /quiet and /norestart command-line switches, so you can also script it.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page