{"id":481782,"date":"2026-05-31T14:39:24","date_gmt":"2026-05-31T14:39:24","guid":{"rendered":"https:\/\/savepearlharbor.com\/?p=481782"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=481782","title":{"rendered":"\u041d\u0430\u0436\u0430\u043b \u00ab\u041f\u0440\u0438\u043d\u044f\u0442\u044c\u00bb \u2014 \u0438 \u0437\u0430\u0431\u044b\u043b. \u0410 \u043c\u044b \u0443\u0436\u0435 \u0432\u043d\u0443\u0442\u0440\u0438"},"content":{"rendered":"<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/45b\/175\/fc9\/45b175fc9367c64a52295914f0d673fa.jpg\" width=\"1024\" height=\"1024\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/45b\/175\/fc9\/45b175fc9367c64a52295914f0d673fa.jpg 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/45b\/175\/fc9\/45b175fc9367c64a52295914f0d673fa.jpg 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p><em>     \u0412 \u0440\u0430\u043c\u043a\u0430\u0445 \u043f\u0440\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0433\u043e \u0430\u0443\u0434\u0438\u0442\u0430 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 (Red Team) \u043f\u0435\u0440\u0435\u0434 \u043d\u0430\u043c\u0438 \u0441\u0442\u043e\u044f\u043b\u0430 \u0437\u0430\u0434\u0430\u0447\u0430 \u043d\u0430\u0439\u0442\u0438 \u043d\u043e\u0432\u044b\u0435 \u0432\u0435\u043a\u0442\u043e\u0440\u0430 \u0430\u0442\u0430\u043a\u0438 \u043d\u0430 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044e. \u041c\u044b \u0437\u043d\u0430\u043b\u0438, \u0447\u0442\u043e \u0432\u0441\u0435 \u043e\u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u043e\u0441\u043d\u0430\u0449\u0435\u043d\u044b EDR \u0441 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0447\u0435\u0441\u043a\u0438\u043c \u0430\u043d\u0430\u043b\u0438\u0437\u043e\u043c. \u041d\u0430 \u043f\u0435\u0440\u0438\u043c\u0435\u0442\u0440\u0435 \u043d\u0435 \u0431\u044b\u043b\u043e \u0443\u044f\u0437\u0432\u0438\u043c\u044b\u0445 \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 \u0438\u043b\u0438 \u0434\u0440\u0443\u0433\u0438\u0445 \u0442\u043e\u0447\u0435\u043a \u0432\u0445\u043e\u0434\u0430. \u0420\u0435\u0448\u0438\u043b\u0438 \u0441\u043e\u0441\u0440\u0435\u0434\u043e\u0442\u043e\u0447\u0438\u0442\u044c \u0441\u0432\u043e\u0438 \u0443\u0441\u0438\u043b\u0438\u044f \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0430 \u0441\u043e\u0442\u0440\u0443\u0434\u043d\u0438\u043a\u0430\u0445 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438, \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0444\u0438\u0448\u0438\u043d\u0433\u043e\u0432\u0443\u044e \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044e. \u041f\u043e\u0447\u0442\u043e\u0432\u044b\u0439 \u0441\u0435\u0440\u0432\u0435\u0440 \u2014 Microsoft Office 365. \u041d\u0430\u043b\u0438\u0447\u0438\u0435 EDR \u043d\u0430 \u043e\u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0441\u0440\u0430\u0437\u0443 \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u043b\u043e \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u0441 \u0432\u0440\u0435\u0434\u043e\u043d\u043e\u0441\u043d\u044b\u043c\u0438 \u0432\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u043c\u0438 &#8212; \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u0435 \u0444\u0430\u0439\u043b\u044b, \u043c\u0430\u043a\u0440\u043e\u0441\u044b \u0438\u043b\u0438 \u044d\u043a\u0441\u043f\u043b\u043e\u0439\u0442\u044b \u0434\u043b\u044f Office \u0431\u044b\u043b\u0438 \u0431\u044b \u043b\u0438\u0431\u043e \u0437\u0430\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u043d\u044b, \u043b\u0438\u0431\u043e \u043c\u0433\u043d\u043e\u0432\u0435\u043d\u043d\u043e \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u044b. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u0432\u044b\u0431\u0440\u0430\u043b\u0438 \u0442\u0430\u043a\u0442\u0438\u043a\u0443: \u0430\u0442\u0430\u043a\u0443 \u043d\u0435 \u043d\u0430 \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u0438 \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u043e\u0433\u043e \u041f\u041e, \u0430 \u043d\u0430 \u0441\u0430\u043c \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 OAuth 2.0 \u0432 Office 365, \u0441 \u0446\u0435\u043b\u044c\u044e \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0433\u043e \u043f\u043e\u0447\u0442\u043e\u0432\u044b\u0445 \u044f\u0449\u0438\u043a\u043e\u0432 \u0431\u0435\u0437 \u0435\u0434\u0438\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u0434\u043e\u043d\u043e\u0441\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430.<\/em><\/p>\n<p>     \u0422\u0430\u043a\u0442\u0438\u043a\u0443, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u044b \u0432\u044b\u0431\u0440\u0430\u043b\u0438, \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u0430 \u043a\u0430\u043a OAuth 2.0 authorization code flow. \u041c\u044b \u043d\u0435 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u043b\u0438 \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 \u043f\u043e\u0434\u0434\u0435\u043b\u044c\u043d\u0443\u044e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u0432\u0445\u043e\u0434\u0430. \u0412\u043c\u0435\u0441\u0442\u043e \u044d\u0442\u043e\u0433\u043e \u043c\u044b \u0437\u0430\u0441\u0442\u0430\u0432\u0438\u043b\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u043d\u0430\u0436\u0430\u0442\u044c \u043a\u043d\u043e\u043f\u043a\u0443 \u00ab<strong>\u041f\u0440\u0438\u043d\u044f\u0442\u044c<\/strong>\u00bb \u0432\u043d\u0443\u0442\u0440\u0438 \u043b\u0435\u0433\u0438\u0442\u0438\u043c\u043d\u043e\u0433\u043e \u043e\u043a\u043d\u0430 Microsoft, \u043f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e API \u0441\u043f\u043e\u043a\u043e\u0439\u043d\u043e \u0447\u0438\u0442\u0430\u043b\u0438 \u0435\u0433\u043e \u043f\u043e\u0447\u0442\u0443. <\/p>\n<p>     \u041a\u043b\u044e\u0447\u0435\u0432\u0430\u044f \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u044d\u043a\u043e\u0441\u0438\u0441\u0442\u0435\u043c\u044b Microsoft 365 \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043e\u043d\u0430 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0430 \u043d\u0430 Azure Active Directory. \u041b\u044e\u0431\u043e\u0435 \u0432\u043d\u0435\u0448\u043d\u0435\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0434\u0430\u043d\u043d\u044b\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u0435\u0441\u043b\u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u0442 \u0435\u0433\u043e \u044f\u0432\u043d\u043e\u0435 \u0441\u043e\u0433\u043b\u0430\u0441\u0438\u0435 (consent) \u0438 \u0442\u043e\u043a\u0435\u043d. \u042d\u0442\u0438\u043c \u043c\u044b \u0438 \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438\u0441\u044c.<\/p>\n<p>   \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0430 \u043f\u043e\u0440\u0442\u0430\u043b\u0435 Azure AD \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 \u00ab\u0420\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439\u00bb (App registrations) \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u043b\u0438 \u043d\u043e\u0432\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0441 \u0442\u0438\u043f\u043e\u043c \u00abWeb\u00bb.<\/p>\n<ol>\n<li>\n<p>\u041f\u0435\u0440\u0435\u0448\u043b\u0438 \u043d\u0430 \u043f\u043e\u0440\u0442\u0430\u043b\u00a0Azure AD\u00a0\u2192 \u00ab\u0420\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439\u00bb (App registrations).    <\/p>\n<\/li>\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u043b\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0441 \u0442\u0438\u043f\u043e\u043c \u00abWeb\u00bb.    <\/p>\n<\/li>\n<li>\n<p>\u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 URI \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f (<code>redirect_uri<\/code>) \u0443\u043a\u0430\u0437\u0430\u043b\u0438: <a href=\"https:\/\/myJiracallback.com\/callback\" rel=\"noopener noreferrer nofollow\">https:\/\/myJiracallback.com\/callback<\/a><\/p>\n<\/li>\n<li>\n<p>\u0421\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043b\u0438 client_secret \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 client_id<\/p>\n<\/li>\n<\/ol>\n<p>  \u0414\u0430\u043b\u0435\u0435 \u043c\u044b \u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u0443\u044e \u0441\u0441\u044b\u043b\u043a\u0443, \u0432\u0435\u0434\u0443\u0449\u0443\u044e \u043d\u0435 \u043d\u0430 \u043f\u043e\u0434\u0434\u0435\u043b\u044c\u043d\u044b\u0439, \u0430 \u043d\u0430 \u0441\u0430\u043c\u044b\u0439 \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0438\u0439 \u0441\u0430\u0439\u0442 <a href=\"http:\/\/login.microsoftonline.com\" rel=\"noopener noreferrer nofollow\">login.microsoftonline.com<\/a>. \u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u044d\u0442\u043e\u0439 \u0441\u0441\u044b\u043b\u043a\u0438 \u0432\u043a\u043b\u044e\u0447\u0430\u043b\u0438 \u043d\u0430\u0448 client_id, \u0442\u0438\u043f \u043e\u0442\u0432\u0435\u0442\u0430 code, \u043d\u0430\u0448 redirect_uri, \u0430 \u0441\u0430\u043c\u043e\u0435 \u0433\u043b\u0430\u0432\u043d\u043e\u0435 &#8212; \u043d\u0430\u0431\u043e\u0440 \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u043c\u044b\u0445 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0439 (scope): <a href=\"http:\/\/Mail.Read\" rel=\"noopener noreferrer nofollow\">Mail.Read<\/a> (\u0447\u0442\u0435\u043d\u0438\u0435 \u043f\u0438\u0441\u0435\u043c, \u0442\u0435\u043b \u0438 \u0432\u043b\u043e\u0436\u0435\u043d\u0438\u0439), offline_access (\u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c refresh_token \u0434\u043b\u044f \u0434\u043e\u043b\u0433\u043e\u0441\u0440\u043e\u0447\u043d\u043e\u0433\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u0430).<\/p>\n<pre><code>https:\/\/login.microsoftonline.com\/common\/oauth2\/v2.0\/authorize?client_id=11111111-aaaa-2222-bbbb-333333333333&amp;response_type=code&amp;redirect_uri=https:\/\/myJiracallback.com\/callback&amp;response_mode=query&amp;scope=Mail.Read%20offline_access&amp;state=\u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439_\u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440_\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f```<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:87px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>  \u041f\u043e\u043c\u0438\u043c\u043e \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u043e common \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u0435\u0449\u0435 organizations,consumers \u0438\u043b\u0438 {tenant} \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0439 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438. \u041d\u0438\u0436\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0430 \u0442\u0430\u0431\u043b\u0438\u0446\u0430 \u0441 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432.<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<th data-colwidth=\"119\" width=\"119\">\n<p align=\"center\">Parameter<\/p>\n<\/th>\n<th data-colwidth=\"168\" width=\"168\">\n<p align=\"left\">Required\/optional<\/p>\n<\/th>\n<th>\n<p align=\"left\">Description<\/p>\n<\/th>\n<\/tr>\n<tr>\n<td data-colwidth=\"119\" width=\"119\">\n<p align=\"left\">tenant<\/p>\n<\/td>\n<td data-colwidth=\"168\" width=\"168\">\n<p align=\"left\">required<\/p>\n<\/td>\n<td>\n<p align=\"left\">The\u00a0{tenant}\u00a0value in the path of the request can be used to control who can sign into the application. Valid values are\u00a0common,\u00a0organizations,\u00a0consumers, and tenant identifiers. For more information, see\u00a0Endpoints.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"119\" width=\"119\">\n<p align=\"left\">client_id<\/p>\n<\/td>\n<td data-colwidth=\"168\" width=\"168\">\n<p align=\"left\">required<\/p>\n<\/td>\n<td>\n<p align=\"left\">The\u00a0Application (client) ID\u00a0that the\u00a0Microsoft Entra admin center \u2013 App registrations\u00a0page assigned to your app.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"119\" width=\"119\">\n<p align=\"left\">scope<\/p>\n<\/td>\n<td data-colwidth=\"168\" width=\"168\">\n<p align=\"left\">optional<\/p>\n<\/td>\n<td>\n<p align=\"left\">A space-separated list of scopes. The scopes must all be from a single resource, along with OIDC scopes (profile,\u00a0openid,\u00a0email). For more information, see\u00a0Permissions and consent in the Microsoft identity platform. This parameter is a Microsoft extension to the authorization code flow, intended to allow apps to declare the resource they want the token for during token redemption.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"119\" width=\"119\">\n<p align=\"left\">code<\/p>\n<\/td>\n<td data-colwidth=\"168\" width=\"168\">\n<p align=\"left\">required<\/p>\n<\/td>\n<td>\n<p align=\"left\">The\u00a0authorization_code\u00a0that you acquired in the first leg of the flow.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"119\" width=\"119\">\n<p align=\"left\">redirect_uri<\/p>\n<\/td>\n<td data-colwidth=\"168\" width=\"168\">\n<p align=\"left\">required<\/p>\n<\/td>\n<td>\n<p align=\"left\">The same\u00a0redirect_uri\u00a0value that was used to acquire the\u00a0authorization_code.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"119\" width=\"119\">\n<p align=\"left\">grant_type<\/p>\n<\/td>\n<td data-colwidth=\"168\" width=\"168\">\n<p align=\"left\">required<\/p>\n<\/td>\n<td>\n<p align=\"left\">Must be\u00a0authorization_code\u00a0for the authorization code flow.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"119\" width=\"119\">\n<p align=\"left\">code_verifier<\/p>\n<\/td>\n<td data-colwidth=\"168\" width=\"168\">\n<p align=\"left\">recommended<\/p>\n<\/td>\n<td>\n<p align=\"left\">The same\u00a0code_verifier\u00a0that was used to obtain the authorization_code. Required if PKCE was used in the authorization code grant request. For more information, see the\u00a0PKCE RFC.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"119\" width=\"119\">\n<p align=\"left\">client_secret<\/p>\n<\/td>\n<td data-colwidth=\"168\" width=\"168\">\n<p align=\"left\">required for confidential web apps<\/p>\n<\/td>\n<td>\n<p align=\"left\">The application secret that you created in the app registration portal for your app. Don&#8217;t use the application secret in a native app or single page app because a\u00a0client_secret\u00a0can&#8217;t be reliably stored on devices or web pages. It&#8217;s required for web apps and web APIs, which can store the\u00a0client_secret\u00a0securely on the server side. Like all parameters here, the client secret must be URL-encoded before being sent. This step is done by the SDK. For more information on URI encoding, see the\u00a0URI Generic Syntax specification. The Basic auth pattern of instead providing credentials in the Authorization header, per\u00a0RFC 6749\u00a0is also supported.<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>  \u0421\u0441\u044b\u043b\u043a\u0430 \u0431\u044b\u043b\u0430 \u043c\u0438\u043d\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u0430 \u0447\u0435\u0440\u0435\u0437 \u0441\u0435\u0440\u0432\u0438\u0441 \u043a\u043e\u0440\u043e\u0442\u043a\u0438\u0445 \u0441\u0441\u044b\u043b\u043e\u043a \u0438 \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0430 \u0432 \u0442\u0435\u043b\u043e \u043e\u0431\u044b\u0447\u043d\u043e\u0433\u043e \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u0433\u043e \u043f\u0438\u0441\u044c\u043c\u0430.<\/p>\n<blockquote>\n<p><strong><em>\u0423\u0432\u0430\u0436\u0430\u0435\u043c\u044b\u0435 \u043a\u043e\u043b\u043b\u0435\u0433\u0438<\/em><\/strong><em>,<br \/>\u041e\u0442\u0434\u0435\u043b \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u043d\u043e \u0441 \u0418\u0422-\u0434\u0435\u043f\u0430\u0440\u0442\u0430\u043c\u0435\u043d\u0442\u043e\u043c \u0432\u043d\u0435\u0434\u0440\u044f\u0435\u0442 \u0435\u0434\u0438\u043d\u043e\u0435   \u043e\u043a\u043d\u043e \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 (SSO) \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u043a\u043e\u0440\u043f\u043e\u0440\u0430\u0442\u0438\u0432\u043d\u044b\u0445 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432.<br \/>\u0422\u0435\u043f\u0435\u0440\u044c \u0434\u043b\u044f \u0432\u0445\u043e\u0434\u0430 \u0432 Jira, Confluence, SharePoint \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u043f\u0430\u0440\u043e\u043b\u0438 \u2014 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043e\u0440\u043f\u043e\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0430 Microsoft 365.<br \/>\u0427\u0442\u043e\u0431\u044b \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u043e\u0432\u0443\u044e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0434\u043b\u044f \u0432\u0430\u0448\u0435\u0439 \u0443\u0447\u0451\u0442\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438, \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435 \u0432\u0441\u0435\u0433\u043e \u043e\u0434\u043d\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435: <\/em><strong><em>URL<\/em><\/strong><em><br \/><\/em><strong><em>\u0415\u0441\u043b\u0438 \u0432\u044b \u043d\u0435 \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u0443\u0435\u0442\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0434\u043e 30 \u043c\u0430\u044f, \u0434\u043e\u0441\u0442\u0443\u043f \u043a Jira \u0438 Confluence \u0431\u0443\u0434\u0435\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d.<\/em><\/strong><\/p>\n<\/blockquote>\n<p>  \u041a\u043e\u0433\u0434\u0430 \u0441\u043e\u0442\u0440\u0443\u0434\u043d\u0438\u043a \u043d\u0430\u0436\u0438\u043c\u0430\u043b \u00ab\u041f\u0440\u0438\u043d\u044f\u0442\u044c\u00bb (Accept) \u0432 \u043e\u043a\u043d\u0435 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0439 Microsoft, \u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 code \u043d\u0430 <code>myJiracallback.com\/callback?code=0.AX...&amp;state=user1<\/code>.<\/p>\n<p>  \u0427\u0442\u043e\u0431\u044b \u043f\u043e\u043d\u044f\u0442\u044c \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0434\u0430\u043d\u043d\u0430\u044f \u0441\u0445\u0435\u043c\u0430 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043e\u043f\u0438\u0448\u0435\u043c \u0448\u0430\u0433\u0438 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0434\u043b\u044f \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0430\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f (Native App)\u00a0\u0434\u043b\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a\u00a0Web API\u00a0\u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430\u00a0OAuth 2.0.<\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/698\/d6b\/ead\/698d6bead69c1f62c3377fd87f475808.jpg\" width=\"2470\" height=\"1547\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/698\/d6b\/ead\/698d6bead69c1f62c3377fd87f475808.jpg 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/698\/d6b\/ead\/698d6bead69c1f62c3377fd87f475808.jpg 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<th data-colwidth=\"66\" width=\"66\">\n<p align=\"left\">\u042d\u0442\u0430\u043f<\/p>\n<\/th>\n<th>\n<p align=\"left\">\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0435<\/p>\n<\/th>\n<th>\n<p align=\"left\">\u0427\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442<\/p>\n<\/th>\n<\/tr>\n<tr>\n<td data-colwidth=\"66\" width=\"66\">\n<p align=\"left\"><strong>1<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u043f\u0438\u0441\u044c\u043c\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u0442 \u043f\u0438\u0441\u044c\u043c\u043e \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435 **\u00a0\u0441 \u0430\u0434\u0440\u0435\u0441\u043e\u043c\u00a0<a href=\"http:\/\/login.microsoftonline.com\" rel=\"noopener noreferrer nofollow\"><code>login.microsoftonline.com<\/code><\/a><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"66\" width=\"66\">\n<p align=\"left\"><strong>2<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0410\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 + \u0421\u043e\u0433\u043b\u0430\u0441\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0412 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435\u00a0<strong>\u0432\u0445\u043e\u0434\u0438\u0442 \u0432 \u0443\u0447\u0451\u0442\u043d\u0443\u044e \u0437\u0430\u043f\u0438\u0441\u044c<\/strong>\u00a0\u0438 \u0434\u0430\u0451\u0442 \u0441\u043e\u0433\u043b\u0430\u0441\u0438\u0435<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"66\" width=\"66\">\n<p align=\"left\"><strong>3<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0411\u0440\u0430\u0443\u0437\u0435\u0440 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0440\u0435\u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0442 \u043d\u0430 \u043d\u0430\u0448 \u0441\u0435\u0440\u0432\u0435\u0440 <strong>authorization code<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f\u00a0<strong>authorization code<\/strong>\u00a0(\u043e\u0434\u043d\u043e\u0440\u0430\u0437\u043e\u0432\u044b\u0439 \u043a\u043e\u0434)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"66\" width=\"66\">\n<p align=\"left\"><strong>4<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0414\u0435\u043b\u0430\u0435\u043c \u0437\u0430\u043f\u0440\u043e\u0441 \u043a Microsoft \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f access token \u0438 refresh token<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041d\u0430\u0448 \u0441\u0435\u0440\u0432\u0438\u0441 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u00a0authorization code,client_secret,client_id \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440 Microsoft<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"66\" width=\"66\">\n<p align=\"left\"><strong>5<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c access token \u0438 refresh token<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0421\u0435\u0440\u0432\u0435\u0440 Microsoft \u043e\u0442\u0434\u0430\u0451\u0442\u00a0<strong>access token<\/strong> \u0438\u00a0<strong>refresh token<\/strong>\u00a0(\u0434\u043e\u043b\u0433\u043e\u0436\u0438\u0432\u0443\u0449\u0438\u0439)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"66\" width=\"66\">\n<p align=\"left\"><strong>6<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f access token \u0434\u0435\u043b\u0430\u0435\u043c \u0437\u0430\u043f\u0440\u043e\u0441 \u043a \u043f\u043e\u0447\u0442\u043e\u0432\u043e\u043c\u0443 \u0441\u0435\u0440\u0432\u0438\u0441\u0443.<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041d\u0430\u0448 \u0441\u0435\u0440\u0432\u0438\u0441 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 API, \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u044f\u00a0<strong>access token<\/strong> \u0432 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0435\u00a0<code>Authorization<\/code><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"66\" width=\"66\">\n<p align=\"left\">\n<\/td>\n<td>\n<p align=\"left\">\n<\/td>\n<td>\n<p align=\"left\">\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"66\" width=\"66\">\n<p align=\"left\">\n<\/td>\n<td>\n<p align=\"left\">\u041e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 Access token<\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>Access token \u0438\u0441\u0442\u0435\u043a\u0430\u0435\u0442<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"66\" width=\"66\">\n<p align=\"left\"><strong>1<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c \u0437\u0430\u043f\u0440\u043e\u0441 \u0432 Microsoft<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u00a0<strong>refresh token<\/strong>\u00a0(\u0432\u043c\u0435\u0441\u0442\u0435 \u0441 client_id)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"66\" width=\"66\">\n<p align=\"left\"><strong>2<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u043e\u0442 Microsoft<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0421\u0435\u0440\u0432\u0435\u0440 \u0432\u044b\u0434\u0430\u0451\u0442\u00a0<strong>\u043d\u043e\u0432\u044b\u0439 access token + \u043d\u043e\u0432\u044b\u0439 refresh token<\/strong><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>  \u0428\u0430\u0433\u0438 1,2 \u0434\u0435\u043b\u0430\u0435\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c, \u0430 \u0432\u0441\u0435 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u0448\u0430\u0433\u0438 3-6 \u0434\u0435\u043b\u0430\u0435\u043c \u043c\u044b.<\/p>\n<p>  \u041d\u0430\u043c \u043d\u0443\u0436\u0435\u043d \u0431\u044b\u043b \u043c\u0430\u0441\u0441\u043e\u0432\u044b\u0439 \u0441\u0431\u043e\u0440 \u043e\u0442\u0432\u0435\u0442\u043e\u0432, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u043f\u043e\u0434\u043d\u044f\u043b\u0438 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440 \u043d\u0430 FastAPI<\/p>\n<pre><code class=\"python\">`@app.get(\"\/callback\") async def oauth_callback(code: str, state: str = None):    # \u041e\u0431\u043c\u0435\u043d\u0438\u0432\u0430\u0435\u043c \u043a\u043e\u0434 \u043d\u0430 \u0442\u043e\u043a\u0435\u043d    token_url = \"https:\/\/login.microsoftonline.com\/common\/oauth2\/v2.0\/token\"        data = {        \"client_id\": CLIENT_ID,        \"client_secret\": CLIENT_SECRET,        \"code\": code,        \"redirect_uri\": REDIRECT_URI,        \"grant_type\": \"authorization_code\",    }        response = requests.post(token_url, data=data)    tokens = response.json()        save_to_db(state, tokens)  # \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u0432 \u0411\u0414 \u0441 \u043c\u0435\u0442\u043a\u043e\u0439 \u0441\u043e\u0442\u0440\u0443\u0434\u043d\u0438\u043a\u0430<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0412 \u043e\u0442\u0432\u0435\u0442 \u043e\u0442 Microsoft \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u043b JSON-\u043e\u0431\u044a\u0435\u043a\u0442, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 \u0442\u0440\u0438 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430: access_token (\u0436\u0438\u0432\u0435\u0442 \u043e\u043a\u043e\u043b\u043e \u0447\u0430\u0441\u0430), refresh_token (\u0436\u0438\u0432\u0435\u0442 \u0434\u043e 90 \u0434\u043d\u0435\u0439) \u0438 \u0441\u043f\u0438\u0441\u043e\u043a \u0432\u044b\u0434\u0430\u043d\u043d\u044b\u0445 scope. \u041c\u044b \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u043b\u0438 \u044d\u0442\u0438 \u0442\u043e\u043a\u0435\u043d\u044b \u0432 \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0441 \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u043e\u0439 \u043a \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u0443 \u0441\u043e\u0442\u0440\u0443\u0434\u043d\u0438\u043a\u0430 \u0438\u0437 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 state.<\/p>\n<pre><code>{access_token\": \"eyJ0eXAKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6Ik5HVEZ2ZEstZnl0aEV1Q...\", \"token_type\": \"Bearer\",\"expires_in\": 3599,\"scope\": \"https%3A%2F%2Fgraph.microsoft.com%2Fmail.read\",\"refresh_token\": \"AwABAAAAvPM1KaPlrEqdFSBzjqfTGAMxZGUTdM0t4B4...\",\"id_token\":\"eyJ0eXAiOiJKV1QiLCJhGciOiJub25lIn0.eyJhdWQiOiIyZDRkMTFhMi1mODE0tOD...\"}<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>  \u041d\u0438\u0436\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0430 \u0442\u0430\u0431\u043b\u0438\u0446\u0430 \u0441 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u043e\u0442\u0432\u0435\u0442\u0430 \u043e\u0442 Microsoft. <\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<th data-colwidth=\"131\" width=\"131\">\n<p align=\"left\">Parameter<\/p>\n<\/th>\n<th>\n<p align=\"left\">Description<\/p>\n<\/th>\n<\/tr>\n<tr>\n<td data-colwidth=\"131\" width=\"131\">\n<p align=\"left\">access_token<\/p>\n<\/td>\n<td>\n<p align=\"left\">The requested access token. The app can use this token to authenticate to the secured resource, such as a web API.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"131\" width=\"131\">\n<p align=\"left\">token_type<\/p>\n<\/td>\n<td>\n<p align=\"left\">Indicates the token type value. The only type that Microsoft Entra ID supports is\u00a0<code>Bearer<\/code>.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"131\" width=\"131\">\n<p align=\"left\">expires_in<\/p>\n<\/td>\n<td>\n<p align=\"left\">How long the access token is valid, in seconds.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"131\" width=\"131\">\n<p align=\"left\">scope<\/p>\n<\/td>\n<td>\n<p align=\"left\">The scopes that the\u00a0<code>access_token<\/code>\u00a0is valid for. Optional. This parameter is non-standard and, if omitted, the token is for the scopes requested on the initial leg of the flow.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"131\" width=\"131\">\n<p align=\"left\">refresh_token<\/p>\n<\/td>\n<td>\n<p align=\"left\">An OAuth 2.0 refresh token. The app can use this token to acquire other access tokens after the current access token expires. Refresh tokens are long-lived. They can maintain access to resources for extended periods. For more detail on refreshing an access token, refer to\u00a0<a href=\"https:\/\/learn.microsoft.com\/en-us\/entra\/identity-platform\/v2-oauth2-auth-code-flow#refresh-the-access-token\" rel=\"noopener noreferrer nofollow\">Refresh the access token<\/a>\u00a0later in this article.  <strong>Note:<\/strong>\u00a0Only provided if\u00a0<code>offline_access<\/code>\u00a0scope was requested.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"131\" width=\"131\">\n<p align=\"left\">id_token<\/p>\n<\/td>\n<td>\n<p align=\"left\">A JSON Web Token. The app can decode the segments of this token to request information about the user who signed in. The app can cache the values and display them, and confidential clients can use this token for authorization. For more information about id_tokens, see the\u00a0<a href=\"https:\/\/learn.microsoft.com\/en-us\/entra\/identity-platform\/id-tokens\" rel=\"noopener noreferrer nofollow\"><code>id_token reference<\/code><\/a>.  <strong>Note:<\/strong>\u00a0Only provided if\u00a0<code>openid<\/code>\u00a0scope was requested.<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>  \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 \u043d\u0430\u0448\u0435\u0439 \u0411\u0414  \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u0438 \u0447\u0438\u0442\u0430\u0442\u044c \u043f\u043e\u0447\u0442\u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439.<\/p>\n<pre><code class=\"python\">headers = {\"Authorization\": f\"Bearer {access_token}\"}resp = requests.get(    \"https:\/\/graph.microsoft.com\/v1.0\/me\/messages?$top=100&amp;$select=subject,receivedDateTime,from,hasAttachments&amp;$orderby=receivedDateTime desc\",    headers=headers)emails = resp.json().get(\"value\", [])<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>    \u0417\u0430 \u0434\u0432\u0430 \u0447\u0430\u0441\u0430 \u0440\u0430\u0441\u0441\u044b\u043b\u043a\u0438 (\u0432 \u043d\u0435\u0439 \u0443\u0447\u0430\u0441\u0442\u0432\u043e\u0432\u0430\u043b\u043e 300 \u0441\u043e\u0442\u0440\u0443\u0434\u043d\u0438\u043a\u043e\u0432 ) 132 \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430 (44%) \u043f\u0435\u0440\u0435\u0448\u043b\u0438 \u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0435, 98 \u0438\u0437 \u043d\u0438\u0445 (32,6%) \u043d\u0430\u0436\u0430\u043b\u0438 \u00ab\u041f\u0440\u0438\u043d\u044f\u0442\u044c\u00bb \u0432 \u043e\u043a\u043d\u0435 OAuth2 \u0438 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u0438\u043b\u0438 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0441\u0432\u043e\u0435\u0439 \u043f\u043e\u0447\u0442\u0435. \u041b\u044e\u0434\u0438 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0441\u0432\u043e\u0438\u043c \u0434\u0430\u043d\u043d\u044b\u043c, \u0435\u0441\u043b\u0438 \u0430\u0442\u0430\u043a\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u043b\u0435\u0433\u0438\u0442\u0438\u043c\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 Microsoft \u0438 \u043d\u0435 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 \u043f\u043e\u0434\u043e\u0437\u0440\u0435\u043d\u0438\u0439.<br \/><strong>\u041c\u0435\u0440\u044b \u0440\u0435\u0430\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f<\/strong><br \/> 1. \u0412\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0443\u00a0<strong>\u00abUser consent to apps\u00bb<\/strong>\u00a0\u2192\u00a0Allow user consent for verified publishers only\u00a0\u0438\u043b\u0438\u00a0Deny user consent \u0432\u0442\u043e\u0440\u043e\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0442\u0438\u0442\u0435\u043b\u044c\u043d\u0435\u0439<br \/> 2. \u041d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0441\u0431\u043e\u0440 \u043b\u043e\u0433\u043e\u0432 Azure AD \u0432 SIEM \u0441 \u043a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u0435\u0439\u00a0Consent + \u043c\u0430\u0441\u0441\u043e\u0432\u044b\u0439 MailItemsAccessed<br \/> 3. \u0412\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0443: \u0434\u043e\u0441\u0442\u0443\u043f \u043a Graph API \u0442\u043e\u043b\u044c\u043a\u043e \u0441 \u0433\u0438\u0431\u0440\u0438\u0434\u043d\u044b\u0445 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432 \u0438\u043b\u0438 \u0447\u0435\u0440\u0435\u0437 VPN.<\/p>\n<\/div>\n<p>\u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/1041812\/\">https:\/\/habr.com\/ru\/articles\/1041812\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>           \u0412 \u0440\u0430\u043c\u043a\u0430\u0445 \u043f\u0440\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0433\u043e \u0430\u0443\u0434\u0438\u0442\u0430 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 (Red Team) \u043f\u0435\u0440\u0435\u0434 \u043d\u0430\u043c\u0438 \u0441\u0442\u043e\u044f\u043b\u0430 \u0437\u0430\u0434\u0430\u0447\u0430 \u043d\u0430\u0439\u0442\u0438 \u043d\u043e\u0432\u044b\u0435 \u0432\u0435\u043a\u0442\u043e\u0440\u0430 \u0430\u0442\u0430\u043a\u0438 \u043d\u0430 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044e. \u041c\u044b \u0437\u043d\u0430\u043b\u0438, \u0447\u0442\u043e \u0432\u0441\u0435 \u043e\u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u043e\u0441\u043d\u0430\u0449\u0435\u043d\u044b EDR \u0441 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0447\u0435\u0441\u043a\u0438\u043c \u0430\u043d\u0430\u043b\u0438\u0437\u043e\u043c. \u041d\u0430 \u043f\u0435\u0440\u0438\u043c\u0435\u0442\u0440\u0435 \u043d\u0435 \u0431\u044b\u043b\u043e \u0443\u044f\u0437\u0432\u0438\u043c\u044b\u0445 \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 \u0438\u043b\u0438 \u0434\u0440\u0443\u0433\u0438\u0445 \u0442\u043e\u0447\u0435\u043a \u0432\u0445\u043e\u0434\u0430. \u0420\u0435\u0448\u0438\u043b\u0438 \u0441\u043e\u0441\u0440\u0435\u0434\u043e\u0442\u043e\u0447\u0438\u0442\u044c \u0441\u0432\u043e\u0438 \u0443\u0441\u0438\u043b\u0438\u044f \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0430 \u0441\u043e\u0442\u0440\u0443\u0434\u043d\u0438\u043a\u0430\u0445 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438, \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0444\u0438\u0448\u0438\u043d\u0433\u043e\u0432\u0443\u044e \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044e. \u041f\u043e\u0447\u0442\u043e\u0432\u044b\u0439 \u0441\u0435\u0440\u0432\u0435\u0440 \u2014 Microsoft Office 365. \u041d\u0430\u043b\u0438\u0447\u0438\u0435 EDR \u043d\u0430 \u043e\u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0441\u0440\u0430\u0437\u0443 \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u043b\u043e \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u0441 \u0432\u0440\u0435\u0434\u043e\u043d\u043e\u0441\u043d\u044b\u043c\u0438 \u0432\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u043c\u0438 &#8212; \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u0435 \u0444\u0430\u0439\u043b\u044b, \u043c\u0430\u043a\u0440\u043e\u0441\u044b \u0438\u043b\u0438 \u044d\u043a\u0441\u043f\u043b\u043e\u0439\u0442\u044b \u0434\u043b\u044f Office \u0431\u044b\u043b\u0438 \u0431\u044b \u043b\u0438\u0431\u043e \u0437\u0430\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u043d\u044b, \u043b\u0438\u0431\u043e \u043c\u0433\u043d\u043e\u0432\u0435\u043d\u043d\u043e \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u044b. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u0432\u044b\u0431\u0440\u0430\u043b\u0438 \u0442\u0430\u043a\u0442\u0438\u043a\u0443: \u0430\u0442\u0430\u043a\u0443 \u043d\u0435 \u043d\u0430 \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u0438 \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u043e\u0433\u043e \u041f\u041e, \u0430 \u043d\u0430 \u0441\u0430\u043c \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 OAuth 2.0 \u0432 Office 365, \u0441 \u0446\u0435\u043b\u044c\u044e \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0433\u043e \u043f\u043e\u0447\u0442\u043e\u0432\u044b\u0445 \u044f\u0449\u0438\u043a\u043e\u0432 \u0431\u0435\u0437 \u0435\u0434\u0438\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u0434\u043e\u043d\u043e\u0441\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430.     \u0422\u0430\u043a\u0442\u0438\u043a\u0443, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u044b \u0432\u044b\u0431\u0440\u0430\u043b\u0438, \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u0430 \u043a\u0430\u043a OAuth 2.0 authorization code flow. \u041c\u044b \u043d\u0435 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u043b\u0438 \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 \u043f\u043e\u0434\u0434\u0435\u043b\u044c\u043d\u0443\u044e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u0432\u0445\u043e\u0434\u0430. \u0412\u043c\u0435\u0441\u0442\u043e \u044d\u0442\u043e\u0433\u043e \u043c\u044b \u0437\u0430\u0441\u0442\u0430\u0432\u0438\u043b\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u043d\u0430\u0436\u0430\u0442\u044c \u043a\u043d\u043e\u043f\u043a\u0443 \u00ab\u041f\u0440\u0438\u043d\u044f\u0442\u044c\u00bb \u0432\u043d\u0443\u0442\u0440\u0438 \u043b\u0435\u0433\u0438\u0442\u0438\u043c\u043d\u043e\u0433\u043e \u043e\u043a\u043d\u0430 Microsoft, \u043f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e API \u0441\u043f\u043e\u043a\u043e\u0439\u043d\u043e \u0447\u0438\u0442\u0430\u043b\u0438 \u0435\u0433\u043e \u043f\u043e\u0447\u0442\u0443.      \u041a\u043b\u044e\u0447\u0435\u0432\u0430\u044f \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u044d\u043a\u043e\u0441\u0438\u0441\u0442\u0435\u043c\u044b Microsoft 365 \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043e\u043d\u0430 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0430 \u043d\u0430 Azure Active Directory. \u041b\u044e\u0431\u043e\u0435 \u0432\u043d\u0435\u0448\u043d\u0435\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0434\u0430\u043d\u043d\u044b\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u0435\u0441\u043b\u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u0442 \u0435\u0433\u043e \u044f\u0432\u043d\u043e\u0435 \u0441\u043e\u0433\u043b\u0430\u0441\u0438\u0435 (consent) \u0438 \u0442\u043e\u043a\u0435\u043d. \u042d\u0442\u0438\u043c \u043c\u044b \u0438 \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438\u0441\u044c.   \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0430 \u043f\u043e\u0440\u0442\u0430\u043b\u0435 Azure AD \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 \u00ab\u0420\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439\u00bb (App registrations) \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u043b\u0438 \u043d\u043e\u0432\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0441 \u0442\u0438\u043f\u043e\u043c \u00abWeb\u00bb.\u041f\u0435\u0440\u0435\u0448\u043b\u0438 \u043d\u0430 \u043f\u043e\u0440\u0442\u0430\u043b\u00a0Azure AD\u00a0\u2192 \u00ab\u0420\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439\u00bb (App registrations).    \u0421\u043e\u0437\u0434\u0430\u043b\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0441 \u0442\u0438\u043f\u043e\u043c \u00abWeb\u00bb.    \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 URI \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f (redirect_uri) \u0443\u043a\u0430\u0437\u0430\u043b\u0438: https:\/\/myJiracallback.com\/callback\u0421\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043b\u0438 client_secret \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 client_id  \u0414\u0430\u043b\u0435\u0435 \u043c\u044b \u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u0443\u044e \u0441\u0441\u044b\u043b\u043a\u0443, \u0432\u0435\u0434\u0443\u0449\u0443\u044e \u043d\u0435 \u043d\u0430 \u043f\u043e\u0434\u0434\u0435\u043b\u044c\u043d\u044b\u0439, \u0430 \u043d\u0430 \u0441\u0430\u043c\u044b\u0439 \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0438\u0439 \u0441\u0430\u0439\u0442 login.microsoftonline.com. \u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u044d\u0442\u043e\u0439 \u0441\u0441\u044b\u043b\u043a\u0438 \u0432\u043a\u043b\u044e\u0447\u0430\u043b\u0438 \u043d\u0430\u0448 client_id, \u0442\u0438\u043f \u043e\u0442\u0432\u0435\u0442\u0430 code, \u043d\u0430\u0448 redirect_uri, \u0430 \u0441\u0430\u043c\u043e\u0435 \u0433\u043b\u0430\u0432\u043d\u043e\u0435 &#8212; \u043d\u0430\u0431\u043e\u0440 \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u043c\u044b\u0445 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0439 (scope): Mail.Read (\u0447\u0442\u0435\u043d\u0438\u0435 \u043f\u0438\u0441\u0435\u043c, \u0442\u0435\u043b \u0438 \u0432\u043b\u043e\u0436\u0435\u043d\u0438\u0439), offline_access (\u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c refresh_token \u0434\u043b\u044f \u0434\u043e\u043b\u0433\u043e\u0441\u0440\u043e\u0447\u043d\u043e\u0433\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u0430).https:\/\/login.microsoftonline.com\/common\/oauth2\/v2.0\/authorize?client_id=11111111-aaaa-2222-bbbb-333333333333&amp;response_type=code&amp;redirect_uri=https:\/\/myJiracallback.com\/callback&amp;response_mode=query&amp;scope=Mail.Read%20offline_access&amp;state=\u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439_\u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440_\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f&#171;`  \u041f\u043e\u043c\u0438\u043c\u043e \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u043e common \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u0435\u0449\u0435 organizations,consumers \u0438\u043b\u0438 {tenant} \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0439 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438. \u041d\u0438\u0436\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0430 \u0442\u0430\u0431\u043b\u0438\u0446\u0430 \u0441 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432.ParameterRequired\/optionalDescriptiontenantrequiredThe\u00a0{tenant}\u00a0value in the path of the request can be used to control who can sign into the application. Valid values are\u00a0common,\u00a0organizations,\u00a0consumers, and tenant identifiers. For more information, see\u00a0Endpoints.client_idrequiredThe\u00a0Application (client) ID\u00a0that the\u00a0Microsoft Entra admin center \u2013 App registrations\u00a0page assigned to your app.scopeoptionalA space-separated list of scopes. The scopes must all be from a single resource, along with OIDC scopes (profile,\u00a0openid,\u00a0email). For more information, see\u00a0Permissions and consent in the Microsoft identity platform. This parameter is a Microsoft extension to the authorization code flow, intended to allow apps to declare the resource they want the token for during token redemption.coderequiredThe\u00a0authorization_code\u00a0that you acquired in the first leg of the flow.redirect_urirequiredThe same\u00a0redirect_uri\u00a0value that was used to acquire the\u00a0authorization_code.grant_typerequiredMust be\u00a0authorization_code\u00a0for the authorization code flow.code_verifierrecommendedThe same\u00a0code_verifier\u00a0that was used to obtain the authorization_code. Required if PKCE was used in the authorization code grant request. For more information, see the\u00a0PKCE RFC.client_secretrequired for confidential web appsThe application secret that you created in the app registration portal for your app. Don&#8217;t use the application secret in a native app or single page app because a\u00a0client_secret\u00a0can&#8217;t be reliably stored on devices or web pages. It&#8217;s required for web apps and web APIs, which can store the\u00a0client_secret\u00a0securely on the server side. Like all parameters here, the client secret must be URL-encoded before being sent. This step is done by the SDK. For more information on URI encoding, see the\u00a0URI Generic Syntax specification. The Basic auth pattern of instead providing credentials in the Authorization header, per\u00a0RFC 6749\u00a0is also supported.  \u0421\u0441\u044b\u043b\u043a\u0430 \u0431\u044b\u043b\u0430 \u043c\u0438\u043d\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u0430 \u0447\u0435\u0440\u0435\u0437 \u0441\u0435\u0440\u0432\u0438\u0441 \u043a\u043e\u0440\u043e\u0442\u043a\u0438\u0445 \u0441\u0441\u044b\u043b\u043e\u043a \u0438 \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0430 \u0432 \u0442\u0435\u043b\u043e \u043e\u0431\u044b\u0447\u043d\u043e\u0433\u043e \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u0433\u043e \u043f\u0438\u0441\u044c\u043c\u0430.\u0423\u0432\u0430\u0436\u0430\u0435\u043c\u044b\u0435 \u043a\u043e\u043b\u043b\u0435\u0433\u0438,\u041e\u0442\u0434\u0435\u043b \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u043d\u043e \u0441 \u0418\u0422-\u0434\u0435\u043f\u0430\u0440\u0442\u0430\u043c\u0435\u043d\u0442\u043e\u043c \u0432\u043d\u0435\u0434\u0440\u044f\u0435\u0442 \u0435\u0434\u0438\u043d\u043e\u0435   \u043e\u043a\u043d\u043e \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 (SSO) \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u043a\u043e\u0440\u043f\u043e\u0440\u0430\u0442\u0438\u0432\u043d\u044b\u0445 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432.\u0422\u0435\u043f\u0435\u0440\u044c \u0434\u043b\u044f \u0432\u0445\u043e\u0434\u0430 \u0432 Jira, Confluence, SharePoint \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u043f\u0430\u0440\u043e\u043b\u0438 \u2014 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043e\u0440\u043f\u043e\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0430 Microsoft 365.\u0427\u0442\u043e\u0431\u044b \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u043e\u0432\u0443\u044e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0434\u043b\u044f \u0432\u0430\u0448\u0435\u0439 \u0443\u0447\u0451\u0442\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438, \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435 \u0432\u0441\u0435\u0433\u043e \u043e\u0434\u043d\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435: URL\u0415\u0441\u043b\u0438 \u0432\u044b \u043d\u0435 \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u0443\u0435\u0442\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0434\u043e 30 \u043c\u0430\u044f, \u0434\u043e\u0441\u0442\u0443\u043f \u043a Jira \u0438 Confluence \u0431\u0443\u0434\u0435\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d.  \u041a\u043e\u0433\u0434\u0430 \u0441\u043e\u0442\u0440\u0443\u0434\u043d\u0438\u043a \u043d\u0430\u0436\u0438\u043c\u0430\u043b \u00ab\u041f\u0440\u0438\u043d\u044f\u0442\u044c\u00bb (Accept) \u0432 \u043e\u043a\u043d\u0435 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0439 Microsoft, \u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 code \u043d\u0430 myJiracallback.com\/callback?code=0.AX&#8230;&amp;state=user1.  \u0427\u0442\u043e\u0431\u044b \u043f\u043e\u043d\u044f\u0442\u044c \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0434\u0430\u043d\u043d\u0430\u044f \u0441\u0445\u0435\u043c\u0430 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043e\u043f\u0438\u0448\u0435\u043c \u0448\u0430\u0433\u0438 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0434\u043b\u044f \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0430\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f (Native App)\u00a0\u0434\u043b\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a\u00a0Web API\u00a0\u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430\u00a0OAuth 2.0.\u042d\u0442\u0430\u043f\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0435\u0427\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u04421\u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u043f\u0438\u0441\u044c\u043c\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u0442 \u043f\u0438\u0441\u044c\u043c\u043e \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435 **\u00a0\u0441 \u0430\u0434\u0440\u0435\u0441\u043e\u043c\u00a0login.microsoftonline.com2\u0410\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 + \u0421\u043e\u0433\u043b\u0430\u0441\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u0412 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435\u00a0\u0432\u0445\u043e\u0434\u0438\u0442 \u0432 \u0443\u0447\u0451\u0442\u043d\u0443\u044e \u0437\u0430\u043f\u0438\u0441\u044c\u00a0\u0438 \u0434\u0430\u0451\u0442 \u0441\u043e\u0433\u043b\u0430\u0441\u0438\u04353\u0411\u0440\u0430\u0443\u0437\u0435\u0440 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0440\u0435\u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0442 \u043d\u0430 \u043d\u0430\u0448 \u0441\u0435\u0440\u0432\u0435\u0440 authorization code\u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f\u00a0authorization code\u00a0(\u043e\u0434\u043d\u043e\u0440\u0430\u0437\u043e\u0432\u044b\u0439 \u043a\u043e\u0434)4\u0414\u0435\u043b\u0430\u0435\u043c \u0437\u0430\u043f\u0440\u043e\u0441 \u043a Microsoft \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f access token \u0438 refresh token\u041d\u0430\u0448 \u0441\u0435\u0440\u0432\u0438\u0441 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u00a0authorization code,client_secret,client_id \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440 Microsoft5\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c access token \u0438 refresh token\u0421\u0435\u0440\u0432\u0435\u0440 Microsoft \u043e\u0442\u0434\u0430\u0451\u0442\u00a0access token \u0438\u00a0refresh token\u00a0(\u0434\u043e\u043b\u0433\u043e\u0436\u0438\u0432\u0443\u0449\u0438\u0439)6\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f access token \u0434\u0435\u043b\u0430\u0435\u043c \u0437\u0430\u043f\u0440\u043e\u0441 \u043a \u043f\u043e\u0447\u0442\u043e\u0432\u043e\u043c\u0443 \u0441\u0435\u0440\u0432\u0438\u0441\u0443.\u041d\u0430\u0448 \u0441\u0435\u0440\u0432\u0438\u0441 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 API, \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u044f\u00a0access token \u0432 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0435\u00a0Authorization\u041e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 Access tokenAccess token \u0438\u0441\u0442\u0435\u043a\u0430\u0435\u04421\u041e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c \u0437\u0430\u043f\u0440\u043e\u0441 \u0432 Microsoft\u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u00a0refresh token\u00a0(\u0432\u043c\u0435\u0441\u0442\u0435 \u0441 client_id)2\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u043e\u0442 Microsoft\u0421\u0435\u0440\u0432\u0435\u0440 \u0432\u044b\u0434\u0430\u0451\u0442\u00a0\u043d\u043e\u0432\u044b\u0439 access token + \u043d\u043e\u0432\u044b\u0439 refresh token  \u0428\u0430\u0433\u0438 1,2 \u0434\u0435\u043b\u0430\u0435\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c, \u0430 \u0432\u0441\u0435 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u0448\u0430\u0433\u0438 3-6 \u0434\u0435\u043b\u0430\u0435\u043c \u043c\u044b.  \u041d\u0430\u043c \u043d\u0443\u0436\u0435\u043d \u0431\u044b\u043b \u043c\u0430\u0441\u0441\u043e\u0432\u044b\u0439 \u0441\u0431\u043e\u0440 \u043e\u0442\u0432\u0435\u0442\u043e\u0432, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u043f\u043e\u0434\u043d\u044f\u043b\u0438 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440 \u043d\u0430 FastAPI`@app.get(&#171;\/callback&#187;) async def oauth_callback(code: str, state: str = None):    # \u041e\u0431\u043c\u0435\u043d\u0438\u0432\u0430\u0435\u043c \u043a\u043e\u0434 \u043d\u0430 \u0442\u043e\u043a\u0435\u043d    token_url = &#171;https:\/\/login.microsoftonline.com\/common\/oauth2\/v2.0\/token&#187;        data = {        &#171;client_id&#187;: CLIENT_ID,        &#171;client_secret&#187;: CLIENT_SECRET,        &#171;code&#187;: code,        &#171;redirect_uri&#187;: REDIRECT_URI,        &#171;grant_type&#187;: &#171;authorization_code&#187;,    }        response = requests.post(token_url, data=data)    tokens = response.json()        save_to_db(state, tokens)  # \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u0432 \u0411\u0414 \u0441 \u043c\u0435\u0442\u043a\u043e\u0439 \u0441\u043e\u0442\u0440\u0443\u0434\u043d\u0438\u043a\u0430\u0412 \u043e\u0442\u0432\u0435\u0442 \u043e\u0442 Microsoft \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u043b JSON-\u043e\u0431\u044a\u0435\u043a\u0442, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 \u0442\u0440\u0438 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430: access_token (\u0436\u0438\u0432\u0435\u0442 \u043e\u043a\u043e\u043b\u043e \u0447\u0430\u0441\u0430), refresh_token (\u0436\u0438\u0432\u0435\u0442 \u0434\u043e 90 \u0434\u043d\u0435\u0439) \u0438 \u0441\u043f\u0438\u0441\u043e\u043a \u0432\u044b\u0434\u0430\u043d\u043d\u044b\u0445 scope. \u041c\u044b \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u043b\u0438 \u044d\u0442\u0438 \u0442\u043e\u043a\u0435\u043d\u044b \u0432 \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0441 \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u043e\u0439 \u043a \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u0443 \u0441\u043e\u0442\u0440\u0443\u0434\u043d\u0438\u043a\u0430 \u0438\u0437 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 state.{access_token&#187;: &#171;eyJ0eXAKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6Ik5HVEZ2ZEstZnl0aEV1Q&#8230;&#187;, &#171;token_type&#187;: &#171;Bearer&#187;,&#187;expires_in&#187;: 3599,&#187;scope&#187;: &#171;https%3A%2F%2Fgraph.microsoft.com%2Fmail.read&#187;,&#187;refresh_token&#187;: &#171;AwABAAAAvPM1KaPlrEqdFSBzjqfTGAMxZGUTdM0t4B4&#8230;&#187;,&#187;id_token&#187;:&#187;eyJ0eXAiOiJKV1QiLCJhGciOiJub25lIn0.eyJhdWQiOiIyZDRkMTFhMi1mODE0tOD&#8230;&#187;}  \u041d\u0438\u0436\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0430 \u0442\u0430\u0431\u043b\u0438\u0446\u0430 \u0441 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u043e\u0442\u0432\u0435\u0442\u0430 \u043e\u0442 Microsoft. ParameterDescriptionaccess_tokenThe requested access token. The app can use this token to authenticate to the secured resource, such as a web API.token_typeIndicates the token type value. The only type that Microsoft Entra ID supports is\u00a0Bearer.expires_inHow long the access token is valid, in seconds.scopeThe scopes that the\u00a0access_token\u00a0is valid for. Optional. This parameter is non-standard and, if omitted, the token is for the scopes requested on the initial leg of the flow.refresh_tokenAn OAuth 2.0 refresh token. The app can use this token to acquire other access tokens after the current access token expires. Refresh tokens are long-lived. They can maintain access to resources for extended periods. For more detail on refreshing an access token, refer to\u00a0Refresh the access token\u00a0later in this article.  Note:\u00a0Only provided if\u00a0offline_access\u00a0scope was requested.id_tokenA JSON Web Token. The app can decode the segments of this token to request information about the user who signed in. The app can cache the values and display them, and confidential clients can use this token for authorization. For more information about id_tokens, see the\u00a0id_token reference.  Note:\u00a0Only provided if\u00a0openid\u00a0scope was requested.  \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 \u043d\u0430\u0448\u0435\u0439 \u0411\u0414  \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u0438 \u0447\u0438\u0442\u0430\u0442\u044c \u043f\u043e\u0447\u0442\u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439.headers = {&#171;Authorization&#187;: f&#187;Bearer {access_token}&#187;}resp = requests.get(    &#171;https:\/\/graph.microsoft.com\/v1.0\/me\/messages?$top=100&amp;$select=subject,receivedDateTime,from,hasAttachments&amp;$orderby=receivedDateTime desc&#187;,    headers=headers)emails = resp.json().get(&#171;value&#187;, [])    \u0417\u0430 \u0434\u0432\u0430 \u0447\u0430\u0441\u0430 \u0440\u0430\u0441\u0441\u044b\u043b\u043a\u0438 (\u0432 \u043d\u0435\u0439 \u0443\u0447\u0430\u0441\u0442\u0432\u043e\u0432\u0430\u043b\u043e 300 \u0441\u043e\u0442\u0440\u0443\u0434\u043d\u0438\u043a\u043e\u0432 ) 132 \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430 (44%) \u043f\u0435\u0440\u0435\u0448\u043b\u0438 \u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0435, 98 \u0438\u0437 \u043d\u0438\u0445 (32,6%) \u043d\u0430\u0436\u0430\u043b\u0438 \u00ab\u041f\u0440\u0438\u043d\u044f\u0442\u044c\u00bb \u0432 \u043e\u043a\u043d\u0435 OAuth2 \u0438 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u0438\u043b\u0438 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0441\u0432\u043e\u0435\u0439 \u043f\u043e\u0447\u0442\u0435. \u041b\u044e\u0434\u0438 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0441\u0432\u043e\u0438\u043c \u0434\u0430\u043d\u043d\u044b\u043c, \u0435\u0441\u043b\u0438 \u0430\u0442\u0430\u043a\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u043b\u0435\u0433\u0438\u0442\u0438\u043c\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 Microsoft \u0438 \u043d\u0435 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 \u043f\u043e\u0434\u043e\u0437\u0440\u0435\u043d\u0438\u0439.\u041c\u0435\u0440\u044b \u0440\u0435\u0430\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f 1. \u0412\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0443\u00a0\u00abUser consent to apps\u00bb\u00a0\u2192\u00a0Allow user consent for verified publishers only\u00a0\u0438\u043b\u0438\u00a0Deny user consent \u0432\u0442\u043e\u0440\u043e\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0442\u0438\u0442\u0435\u043b\u044c\u043d\u0435\u0439 2. \u041d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0441\u0431\u043e\u0440 \u043b\u043e\u0433\u043e\u0432 Azure AD \u0432 SIEM \u0441 \u043a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u0435\u0439\u00a0Consent + \u043c\u0430\u0441\u0441\u043e\u0432\u044b\u0439&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-481782","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/481782","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=481782"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/481782\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=481782"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=481782"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=481782"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}