{"id":16630163,"url":"https://github.com/anoopt/ms-graph-create-event-msal","last_synced_at":"2025-04-05T00:45:01.864Z","repository":{"id":42472379,"uuid":"383627300","full_name":"anoopt/ms-graph-create-event-msal","owner":"anoopt","description":"📆 A GitHub action to create Outlook calendar event with Microsoft Graph using MSAL","archived":false,"fork":false,"pushed_at":"2023-11-08T16:06:16.000Z","size":873,"stargazers_count":1,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-10T19:05:58.789Z","etag":null,"topics":["calendar","microsoft-graph"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/anoopt.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":"2021-07-07T00:07:46.000Z","updated_at":"2024-01-29T16:40:54.000Z","dependencies_parsed_at":"2024-12-18T05:41:00.868Z","dependency_job_id":"6ed3055f-da96-4629-851e-3dd5a9874f30","html_url":"https://github.com/anoopt/ms-graph-create-event-msal","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anoopt%2Fms-graph-create-event-msal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anoopt%2Fms-graph-create-event-msal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anoopt%2Fms-graph-create-event-msal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anoopt%2Fms-graph-create-event-msal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/anoopt","download_url":"https://codeload.github.com/anoopt/ms-graph-create-event-msal/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247271496,"owners_count":20911586,"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":["calendar","microsoft-graph"],"created_at":"2024-10-12T04:45:19.166Z","updated_at":"2025-04-05T00:45:01.841Z","avatar_url":"https://github.com/anoopt.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GitHub Action to create event with Microsoft Graph using MSAL\n\nThis action creates an event in a user's Outlook calendar. This action can be used when say for example a pull request is created and some one has to review it. The event that gets created will have some details about the pull request.\n\n## What it does\n\n![Action](./assets/action.png)\n\n## Pre requisites\n\nThis action uses Microsoft Graph to create an event. So please make sure that you [register an application in Azure AD](https://docs.microsoft.com/en-us/graph/auth-register-app-v2), provide that app `Calendars.ReadWrite` permissions and create a client secret for that.\n\nIn your GitHub repo [create 3 secrets](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/creating-and-using-encrypted-secrets) with the following information:\n\n* CLIENT_ID - The Id of the app registration created above\n* CLIENT_SECRET - A secret of the app registration created above.\n* TENANT_ID - The Id of your Microsoft 365 tenant\n\n\n## Usage\n\nBelow is a workflow code\n\n```workflow\nname: MS Graph Event\n\non: [pull_request]\n\njobs:\n  create-event:\n    runs-on: ubuntu-latest\n    name: Create Event\n    steps:\n    - name: Create event on the next day\n      uses: anoopt/ms-graph-create-event-msal@v1\n      with:\n        clientId: ${{ secrets.CLIENT_ID }}\n        clientSecret: ${{ secrets.CLIENT_SECRET }}\n        tenantId: ${{ secrets.TENANT_ID }}\n        subject: 'Review pull request'\n        body: 'A new PR has been submitted on ${{ github.repository }} from ${{ github.actor }}. Please review it.'\n        userEmail: 'user@contoso.onmicrosoft.com'\n```\n\nWhen there is a pull request, the above workflow will create an event for user 'user@contoso.onmicrosoft.com' on the next day from 12:00 to 13:00 (automatic as no start or end is specified).  \n\n## More Information\n\nAll of the information attached to an event is available in the `github.event` variable. To see the possible values, you can use the following step in your workflow:\n\n```yaml\n- run: echo '${{ toJson(github.event) }}'\n```\n\n```workflow\nname: MS Graph Event\n\non: [push]\n\njobs:\n  create-event:\n    runs-on: ubuntu-latest\n    name: Create Event\n    steps:\n    - name: Checkout\n      uses: actions/checkout@v1\n    - name: Create event on the specified day and time\n      uses: anoopt/ms-graph-create-event-msal@v1\n      with:\n        clientId: ${{ secrets.CLIENT_ID }}\n        clientSecret: ${{ secrets.CLIENT_SECRET }}\n        tenantId: ${{ secrets.TENANT_ID }}\n        subject: 'Code pushed'\n        body: 'Some files have been pushed on ${{ github.repository }} from ${{ github.actor }}. Please find the details here ${{ github.event.compare }}.'\n        userEmail: 'user@contoso.onmicrosoft.com'\n        start: '2019-12-04T14:30:00'\n        end: '2019-12-04T15:00:00'\n```\n\nWhen there is a code push, the above workflow will create an event for user 'user@contoso.onmicrosoft.com' on 4th Dec 2019 from 14:30 to 15:00 with the URL of compare in details.\n\n## Event that gets created\n\n![Event](./assets/endresult.png)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanoopt%2Fms-graph-create-event-msal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanoopt%2Fms-graph-create-event-msal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanoopt%2Fms-graph-create-event-msal/lists"}