{"id":24736723,"url":"https://github.com/thiagogarbazza/poc-java-microsoft-graph","last_synced_at":"2025-03-22T17:24:22.972Z","repository":{"id":272806148,"uuid":"917803510","full_name":"thiagogarbazza/poc-java-microsoft-graph","owner":"thiagogarbazza","description":"POC Microsoft Graph with java","archived":false,"fork":false,"pushed_at":"2025-01-16T17:48:59.000Z","size":12,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-21T05:02:53.870Z","etag":null,"topics":["java","microsoft-graph","poc"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thiagogarbazza.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2025-01-16T17:14:47.000Z","updated_at":"2025-01-16T18:01:04.000Z","dependencies_parsed_at":"2025-01-16T19:08:34.233Z","dependency_job_id":"e4d96b0d-762d-429b-b9a8-0e932c646a11","html_url":"https://github.com/thiagogarbazza/poc-java-microsoft-graph","commit_stats":null,"previous_names":["thiagogarbazza/poc-java-microsoft-graph"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thiagogarbazza%2Fpoc-java-microsoft-graph","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thiagogarbazza%2Fpoc-java-microsoft-graph/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thiagogarbazza%2Fpoc-java-microsoft-graph/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thiagogarbazza%2Fpoc-java-microsoft-graph/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thiagogarbazza","download_url":"https://codeload.github.com/thiagogarbazza/poc-java-microsoft-graph/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244993124,"owners_count":20543915,"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":["java","microsoft-graph","poc"],"created_at":"2025-01-27T21:27:01.943Z","updated_at":"2025-03-22T17:24:22.947Z","avatar_url":"https://github.com/thiagogarbazza.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# poc-java-microsoft-graph\nPOC Microsoft Graph with java\n\n## Variáveis importantes\n\n1. `TENANT_ID`: ID do diretório (locatáro)\n1. `CLIENT_ID`: ID do aplicativo (cliente)\n1. `CLIENT_SECRET`: Segredo (senha) do cliente para acesso via API.\n1. `SITE_ID`: ID do site (sharepoint)\n\n## Conceder permissão Sites.Selected\n\nPara a permissão \"funcionar\" é preciso conceder a permissão de leitura/escrita ao APP.\n1. Tem que ser dado a permissão \"Sites.FullControl.All\" para o aplicativo.\n1. Depois disso tem que chamar uma API para dar permissão no site ao aplicativo.\n   ```js\n   const URL = `https://graph.microsoft.com/v1.0/sites/${SITE_ID}/permissions`\n   const HEADERS = {\n     \"Authorization\": `Bearer ${TOKEN}`\n   }\n   const BODY = {\n     \"roles\": [\"write\"],\n     \"grantedToIdentities\": [\n       {\n         \"application\": {\n           \"id\": \"${APP_ID}\",\n           \"displayName\": \"${APP_NAME}\"\n         }\n       }\n    ]\n   }\n   ```\n1. Remove a permissão \"Sites.FullControl.All\" para o aplicativo.\n\nObservação: processo resumido neste texto do GIT https://gist.github.com/ruanswanepoel/14fd1c97972cabf9ca3d6c0d9c5fc542","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthiagogarbazza%2Fpoc-java-microsoft-graph","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthiagogarbazza%2Fpoc-java-microsoft-graph","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthiagogarbazza%2Fpoc-java-microsoft-graph/lists"}