{"id":18387666,"url":"https://github.com/thenetworg/dreamspark-sso","last_synced_at":"2025-06-23T20:05:11.516Z","repository":{"id":113441573,"uuid":"44344806","full_name":"TheNetworg/DreamSpark-SSO","owner":"TheNetworg","description":"DreamSpark SSO for Office 365","archived":false,"fork":false,"pushed_at":"2018-10-09T13:06:56.000Z","size":121,"stargazers_count":7,"open_issues_count":0,"forks_count":5,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-07T01:34:43.872Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://thenetworg.github.io/DreamSpark-SSO","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TheNetworg.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-10-15T20:50:09.000Z","updated_at":"2020-05-29T03:17:10.000Z","dependencies_parsed_at":null,"dependency_job_id":"d9b3efe1-a21d-4471-a22b-36b5622b3756","html_url":"https://github.com/TheNetworg/DreamSpark-SSO","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/TheNetworg/DreamSpark-SSO","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheNetworg%2FDreamSpark-SSO","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheNetworg%2FDreamSpark-SSO/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheNetworg%2FDreamSpark-SSO/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheNetworg%2FDreamSpark-SSO/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TheNetworg","download_url":"https://codeload.github.com/TheNetworg/DreamSpark-SSO/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheNetworg%2FDreamSpark-SSO/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261548719,"owners_count":23175492,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-06T01:27:17.042Z","updated_at":"2025-06-23T20:05:11.482Z","avatar_url":"https://github.com/TheNetworg.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DreamSpark SSO\n\n## Introduction\nThis is the original source code which poweres [DreamSpark SSO](https://go.thenetw.org/dreamsparksso) service. The main purpose of the project being opensourced is to showcase how easy it is to develop applications upon Office 365 and Azure. In production environment, you should be using the [hosted service](https://thenetworg.github.io/DreamSpark-SSO) instead of running your own.\n\n## Technology Used\nThe project is written in PHP, we use [Slim Framework](http://www.slimframework.com) as our base. The whole project is hosted on [Microsoft Azure](https://www.azure.com). Single Sign On and connection to Graph API is provided by [oauth2-azure](https://github.com/thenetworg/oauth2-azure) module. We make use of [Azure Table Storage](https://azure.microsoft.com/en-us/services/storage/) (through [Azure PHP SDK](https://github.com/Azure/azure-sdk-for-php)), for user interface we use [Office UI Fabric](https://github.com/OfficeDev/Office-UI-Fabric) and [App Chrome](https://msdn.microsoft.com/en-us/office/office365/howto/javascript-controls). [Application Insights](https://azure.microsoft.com/en-us/services/application-insights/) are used for application monitoring. We also make use of [CloudFlare](https://www.cloudflare) which provides us with caching, SSL and many more.\n\n## Setting up your own\nIf you would like to contribute to the development, you are probably interested in how-to run your own copy:\n\n1. Deploy the source code to Azure or any other provider of your choice and run `composer install` (if you are using Azure Web Apps, you can use the [Composer extension](https://github.com/SyntaxC4-MSFT/ComposerExtension) to automatically handle Composer automatically when deploying from Git)\n2. [Create a multi-tenant application in your Azure Active Directory](https://azure.microsoft.com/en-us/documentation/articles/resource-group-create-service-principal-portal/) and add the following permissions:\n  * *Delegated Permissions*\n    - Access the directory as the signed-in user\n    - Read directory data\n    - Sign in and read user profile\n  * *Application Permissions*\n    - Read directory data\n    - Read and write directory data\n3. Configure application through the environmental variables\n4. Create a new storage account and add the [connection string](https://azure.microsoft.com/en-us/documentation/articles/web-sites-configure/#connection-strings) into the Web App (name: *Storage* and create table *organizationSettings*)\n5. If you set up everything correctly, the application should work just fine.\n6. In order for the applications to show in user's [My Apps](https://portal.office.com/myapps) page, you should run the `cron.php` in intervals (use WebJobs - *described below*)\n\n### Environmental variables\n| Variable Name | Description |\n| ------------- | ----------- |\n| Auth_appId | The Client Id of application you created in step 2. |\n| Auth_appSecret | The Client Secret of application you created in step 2. |\n| Auth_redirectUri | Your redirect URI which you set when creating application in step 2. |\n| INSTRUMENTATION_KEY *(optional)* | The key of your application insights instance if you want to make use of it. |\n| ENVIRONMENT *(optional)* | Set to `DEV` in order to see all debug messages both from PHP and Slim. |\n\n### Setting up WebJob\nIn the Web App, create a new WebJob. Create a batch file, name it `run.bat` and insert the contents below, then zip the file and upload it as scheduled WebJob to Azure. In our production environment, we run this job every 12 hours.\n```batch\n@ECHO off\ncd \"D:\\home\\site\\wwwroot\"\nphp cron.php\n```\n\n## Application Flow\nApplication is designed to be granted with admin consent - upon first use so users don't have to consent to the application. After that something called *installation* happens which basically sets the tenant up in the Table Sotrage and prepares it for the first use.\n\nUsers get authenticated, authorized and then they are redirected to the DreamSpark Premium (upon successful login).\n\nAdministrators are authenticated, authorized and if then redirected to the application settings. They also have to be explicitely allowed to access DreamSpark Premium just like everyone else.\n\n## Contributing\nFeel free to contribute to this repository - just [create a pull request](https://github.com/TheNetworg/DreamSpark-SSO/pulls). If you found a bug or are having difficulties, [create a new issue](https://github.com/TheNetworg/DreamSpark-SSO/issues).\n\n## Support, Liabilities and Disclaimer\nPlease note that we don't provide any guarantees for this source code. This code is provided under MIT license. If you have any questions or would like to contact us, feel free to do so at [dreamspark@edulog.in](mailto:dreamspark@edulog.in).\n\n© [TheNetw.org s.r.o.](https://thenetw.org) 2015\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthenetworg%2Fdreamspark-sso","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthenetworg%2Fdreamspark-sso","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthenetworg%2Fdreamspark-sso/lists"}