Skip to content

Instantly share code, notes, and snippets.

@AdnanHussainTurki
Created February 14, 2021 22:51
Show Gist options
  • Save AdnanHussainTurki/66e2f90cdd815ad83f99b2e8029ea459 to your computer and use it in GitHub Desktop.
Save AdnanHussainTurki/66e2f90cdd815ad83f99b2e8029ea459 to your computer and use it in GitHub Desktop.
signin.php
<?php
session_start();
require "vendor/autoload.php";
use myPHPnotes\Microsoft\Auth;
$tenant = "common";
$client_id = "f6e12fd3-c628-4694-9c44-290e89e71543";
$client_secret = "s_cB1Aj-0I.0XWa3eVJ6SSf~1EQS3E5r~3";
$callback = "http://localhost:8080/callback.php";
$scopes = ["User.Read"];
$microsoft = new Auth($tenant, $client_id, $client_secret,$callback, $scopes);
header("location: " . $microsoft->getAuthUrl());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment