Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Microsoft API] generate_login_url - support prompt=consent #31942

Merged
merged 97 commits into from Feb 29, 2024

Conversation

michal-dagan
Copy link
Contributor

@michal-dagan michal-dagan commented Jan 3, 2024

Contributing to Cortex XSOAR Content

Make sure to register your contribution by filling the contribution registration form

The Pull Request will be reviewed only after the contribution registration form is filled.

Status

  • In Progress
  • Ready
  • In Hold - (Reason for hold)

Related Issues

fixes: link to the issue

Description

Added prompt=consent triggers the OAuth consent dialog after the user signs in, asking the user to grant permissions to the app.
https://learn.microsoft.com/en-us/entra/identity-platform/v2-oauth2-auth-code-flow

Must have

  • Tests
  • Documentation

Copy link

github-actions bot commented Jan 3, 2024

Coverage

Coverage Report
FileStmtsMissCoverMissing
Packs/ApiModules/Scripts/MicrosoftApiModule
   MicrosoftApiModule.py60918569%211, 215–218, 223, 261, 590–594, 596–602, 688, 701, 722–724, 729–730, 758, 778, 787, 790, 804, 807, 825–826, 839–852, 883–888, 890–891, 912, 918, 942–944, 1007–1008, 1026–1030, 1033–1037, 1039, 1041, 1043, 1073–1075, 1088, 1091–1092, 1106, 1113–1116, 1118–1119, 1121–1124, 1126–1127, 1129–1130, 1132–1136, 1138–1140, 1142–1144, 1146, 1172–1173, 1176, 1187, 1192–1194, 1196–1198, 1200–1204, 1206–1208, 1210–1212, 1214, 1217–1221, 1239, 1265–1267, 1296, 1332–1333, 1335, 1346–1349, 1353, 1355, 1357–1359, 1361–1363, 1371–1372, 1377–1379, 1387–1388, 1390–1394, 1397–1401, 1403, 1458, 1475–1479, 1486, 1488, 1490, 1492, 1494
Packs/AzureDataExplorer/Integrations/AzureDataExplorer
   AzureDataExplorer.py2043781%31–34, 37, 69, 89, 94–96, 214, 492, 508–509, 522–523, 536–537, 599, 602–611, 614, 616–621, 624
Packs/AzureDevOps/Integrations/AzureDevOps
   AzureDevOps.py92522176%52, 63–66, 804–807, 815, 822, 862, 1042, 1046–1047, 1103, 1128, 1338, 1346, 1423–1425, 1451, 1455–1456, 1508, 1512, 1516–1517, 1560, 1564, 1585, 1587–1588, 1591–1596, 1599, 1602–1603, 1607, 1632–1633, 1637–1638, 1642–1646, 1660, 1662–1663, 1665, 1668, 1684–1686, 1688–1696, 1698–1702, 1704–1705, 1707, 1709, 1711, 1735, 1772, 1787–1788, 1790–1791, 1793–1794, 1796, 1836, 1840–1841, 1864, 1887, 1890, 2124, 2253, 2265, 2271, 2456, 2458, 2460–2463, 2465, 2467–2468, 2472–2474, 2476–2479, 2481, 2483, 2485–2489, 2491–2492, 2496, 2514–2515, 2521, 2556–2557, 2559–2560, 2562–2563, 2565–2566, 2568–2569, 2571–2572, 2574–2575, 2577–2578, 2580–2581, 2583–2584, 2586–2587, 2589–2590, 2592–2593, 2595–2596, 2598–2599, 2601–2602, 2604–2605, 2607–2609, 2612–2613, 2615–2616, 2618–2619, 2621–2623, 2625–2626, 2628–2629, 2631–2632, 2634–2635, 2637–2638, 2640–2641, 2643–2644, 2646–2647, 2649–2650, 2652–2653, 2655–2656, 2658–2659, 2661–2662, 2664–2665, 2667–2668, 2670–2671, 2673–2674, 2676–2677, 2679–2680, 2682–2683, 2686, 2688–2693
Packs/AzureKubernetesServices/Integrations/AzureKubernetesServices
   AzureKubernetesServices.py942672%37–40, 100, 103, 132, 139–140, 197, 213–214, 216, 239–240, 243–244, 246, 248, 250, 256, 266–267, 271–272, 298
Packs/AzureLogAnalytics/Integrations/AzureLogAnalytics
   AzureLogAnalytics.py2713885%102–104, 117, 120, 122, 125, 145, 161, 167–168, 182, 187–188, 298, 315, 563–565, 568, 584, 684, 689–691, 693–694, 696–697, 699–700, 702–703, 705–706, 709, 711–712
Packs/AzureNetworkSecurityGroups/Integrations/AzureNetworkSecurityGroups
   AzureNetworkSecurityGroups.py2316372%32–35, 68–71, 93, 113–115, 117, 121, 128–129, 237–238, 241–244, 248–249, 251–252, 255, 292, 300, 304, 310, 315, 366–367, 378–379, 382–384, 386, 388, 390, 395–396, 443–444, 446, 470–471, 474–475, 477, 479, 481, 487, 498–499, 504–505, 510–511, 527, 536
Packs/AzureSQLManagement/Integrations/AzureSQLManagement
   AzureSQLManagement.py2814085%38–41, 70–71, 73–74, 80–84, 377, 416, 489, 524, 569–570, 601–602, 604–605, 639, 657, 659, 661, 706, 709, 712, 715, 718, 721, 724, 729–730, 732–733, 736–737
Packs/AzureStorage/Integrations/AzureStorage
   AzureStorage.py27514447%23–26, 63, 87, 109–110, 119–122, 124–125, 127–128, 130, 132, 134, 136–137, 139–140, 142–143, 146–147, 150–151, 154–155, 158, 160, 162–163, 165–166, 169–170, 172–173, 176–177, 179–180, 182–183, 185–186, 188–189, 191–192, 194, 217–218, 220–221, 223–226, 228–229, 232–235, 237–238, 240–243, 245–246, 248, 250, 252–253, 256–257, 260–261, 264, 266, 268–269, 271–272, 274–275, 277, 301–303, 305–306, 308–309, 311–312, 314, 338–340, 344, 348–349, 351–352, 354, 364, 377, 386–387, 469, 786–789, 791, 795–796, 798, 811–812, 814, 837–838, 841–842, 844, 846, 848, 854, 866–867, 871–872, 876–877, 893, 902
Packs/AzureWAF/Integrations/AzureWAF
   AzureWAF.py2818868%47–50, 82–85, 87, 120–121, 125–129, 136–138, 158, 179, 190–191, 205–206, 211–212, 240–241, 252–255, 257–260, 263–265, 267, 325–327, 329, 331, 333–339, 342–345, 347, 349–350, 352, 364–371, 373, 375–376, 378–380, 396–398, 526, 570, 573–576, 578, 581–583
Packs/MicrosoftDefenderAdvancedThreatProtection/Integrations/MicrosoftDefenderAdvancedThreatProtection
   MicrosoftDefenderAdvancedThreatProtection.py201783858%153, 181, 311, 534, 593, 595, 599, 740, 743, 812, 892, 894, 896, 995, 1001–1010, 1031, 1052, 1067, 1076, 1102, 1108, 1170, 1174, 1178, 1182, 1186, 1196–1197, 1200–1201, 1218–1219, 1223–1224, 1240–1241, 1244, 1275–1276, 1287–1288, 1300–1301, 1318–1319, 1323, 1331–1333, 1335, 1344–1354, 1362–1363, 1376–1379, 1382, 1400–1401, 1411, 1422–1423, 1434–1435, 1446–1447, 1458–1459, 1474–1475, 1488–1492, 1504–1505, 1508, 1520–1521, 1538–1539, 1542, 1558–1559, 1562, 1579–1580, 1584, 1595–1596, 1607–1608, 1616–1617, 1630–1631, 1634, 1645–1646, 1657–1658, 1669–1670, 1681–1682, 1693–1694, 1705–1706, 1717–1718, 1729–1730, 1741–1742, 1755–1756, 1760, 1772–1773, 1790, 1792–1801, 1805–1806, 1808–1810, 1826–1827, 1832–1833, 1837–1840, 1842–1843, 1845–1847, 1851–1852, 1855, 1857–1860, 1871, 1874–1875, 1907, 1915, 1922, 1924, 1930, 1932, 1949–1951, 1955, 1959, 1963–1964, 1978–1979, 1983–1984, 1986, 1989–1990, 1992, 1995–1999, 2002–2004, 2016–2021, 2033–2038, 2047–2048, 2057–2058, 2067–2068, 2077–2078, 2086–2089, 2091, 2099–2103, 2111–2115, 2173, 2185, 2187–2188, 2209–2221, 2223–2225, 2228, 2230–2231, 2240–2251, 2253–2255, 2258, 2260–2261, 2279, 2291, 2293–2299, 2301–2310, 2313–2315, 2317, 2325–2326, 2328–2330, 2332, 2335, 2337, 2433, 2435–2439, 2441–2447, 2451–2453, 2455, 2457–2458, 2536–2538, 2569–2571, 2588, 2590–2595, 2600–2602, 2604, 2607, 2609, 2634–2639, 2641–2643, 2645–2646, 2649–2650, 2656–2657, 2663–2664, 2667–2682, 2710, 2723–2725, 2729, 2737, 2749, 2751, 2761, 2763, 2766–2767, 2776–2780, 2782–2783, 2785–2789, 2791, 2795, 2798, 2800, 2826, 2846, 2915–2931, 2933–2937, 2941, 2947–2952, 2954–2955, 2958, 2963–2966, 2968, 2973, 2984–2985, 2988–2989, 2992–2993, 2998, 3156–3163, 3220–3223, 3225, 3229, 3232, 3241, 3247, 3380–3384, 3388, 3391, 3400, 3409, 3418, 3420–3424, 3428, 3431, 3440–3444, 3448, 3451, 3460, 3465, 3496, 3498–3501, 3503, 3507, 3510, 3533–3538, 3554, 3556–3559, 3561, 3565, 3568, 3577, 3579–3584, 3586, 3589, 3606, 3630–3631, 3642–3643, 3645, 3705, 3707–3708, 3710, 3726–3730, 3733–3735, 3737–3741, 3743–3745, 3756, 3758–3759, 3761–3763, 3779–3781, 3791–3792, 3794, 3796, 3798, 3811–3818, 3820, 3838–3841, 3843, 3868–3870, 3872–3884, 3895–3896, 3914, 3926–3930, 3947–3950, 3967, 3987–3991, 4008–4011, 4024–4029, 4032, 4034–4036, 4041–4044, 4057–4059, 4072–4074, 4087–4097, 4099, 4105–4108, 4110, 4114, 4127–4132, 4134–4138, 4140, 4167–4169, 4171–4176, 4178, 4181, 4183, 4528–4542, 4546–4549, 4551, 4553, 4658, 4718, 4815, 4835, 4908, 4919–4923, 4925–4935, 4937–4938, 4940–4941, 4981, 4990–4991, 4993–4999, 5001–5015, 5017, 5019–5022, 5026, 5035, 5039, 5075–5079, 5089–5095, 5097–5101, 5104, 5113–5114, 5118, 5236, 5239–5242, 5269–5272, 5275–5279, 5281, 5289–5290, 5292, 5300–5302, 5306–5311, 5313, 5321, 5363–5364, 5366–5372, 5384, 5417, 5420–5421, 5424–5425, 5433, 5443, 5476, 5485
Packs/MicrosoftGraphFiles/Integrations/MicrosoftGraphFiles
   MicrosoftGraphFiles.py43511274%115, 118, 122, 156, 165–166, 234–235, 238, 257–260, 264–265, 267–271, 290–292, 296, 298–312, 326–327, 363–364, 408, 424–426, 449–454, 457, 478–479, 498–499, 514, 683, 717–723, 726, 729–731, 733, 742–743, 745, 750, 752, 773–774, 904, 906, 1115, 1118–1125, 1128–1146, 1148–1150
Packs/MicrosoftGraphMail/Integrations/MicrosoftGraphListener
   MicrosoftGraphListener.py420100% 
Packs/MicrosoftGraphUser/Integrations/MicrosoftGraphUser
   MicrosoftGraphUser.py28010064%47, 78, 107, 116, 126, 133, 155, 163, 170, 174, 187–188, 191–192, 194, 198–200, 203, 207–208, 211, 214–216, 221–223, 233, 252, 264, 267, 280–281, 288, 290, 297–298, 302, 313–318, 321, 324–325, 327–330, 335, 356–357, 361–363, 365–368, 376–382, 401–408, 413–414, 417, 419, 421, 430–432, 439, 446–448, 454, 462, 464, 471–472, 494, 497, 500, 534, 539–540
Packs/MicrosoftManagementActivity/Integrations/MicrosoftManagementActivity
   MicrosoftManagementActivity.py2985282%220, 226–227, 229, 266–268, 270, 308, 325–326, 330–334, 349–352, 358, 363–365, 369, 371–372, 374–377, 416–418, 420–424, 449, 567, 570, 601, 606–607, 610, 613, 616, 619, 625, 628–629
Packs/MicrosoftTeams/Integrations/MicrosoftTeams
   MicrosoftTeams.py127934872%61–63, 113, 119, 183, 185, 235, 244, 246, 274–275, 277–280, 282–285, 289, 307, 311, 551–552, 582, 619–620, 633–634, 641–645, 663, 676–681, 683–684, 686–687, 697–698, 714–715, 753–754, 767–770, 772–774, 776–778, 780, 789–790, 794–795, 823, 839–846, 848–852, 854–856, 858–860, 863–866, 868, 870–887, 889, 891–892, 895–898, 900, 902–903, 905–908, 910–911, 913, 918, 920–923, 925–927, 1022–1025, 1033–1036, 1038–1040, 1042–1045, 1047, 1049, 1188, 1190, 1308–1309, 1372, 1444, 1447–1449, 1451–1452, 1454–1455, 1457, 1476, 1481, 1483, 1754–1755, 1840–1843, 1965, 2034, 2043, 2103, 2122–2123, 2126, 2205–2212, 2214–2220, 2225–2226, 2228–2237, 2241–2244, 2246, 2276, 2284, 2299, 2323–2324, 2327, 2384, 2388, 2406, 2437, 2486–2489, 2491–2492, 2494–2500, 2502–2504, 2506–2509, 2511, 2514–2515, 2517, 2519–2522, 2524, 2526–2533, 2535–2544, 2548, 2561–2562, 2565–2569, 2574–2577, 2579, 2614, 2616, 2637–2639, 2641–2642, 2644, 2646–2647, 2649–2650, 2652–2654, 2656, 2658–2662, 2664–2667, 2669–2671, 2673, 2675, 2677–2687, 2689–2695, 2704–2707, 2709–2710, 2713, 2721–2722, 2733–2736, 2740–2741, 2765
TOTAL7522229269% 

Tests Skipped Failures Errors Time
53 0 💤 0 ❌ 0 🔥 3.530s ⏱️

@content-bot
Copy link
Collaborator

This PR was automatically updated by a GitHub Action

  • MicrosoftGraphFiles pack version was bumped to 1.1.22.

To stop automatic version bumps, add the ignore-auto-bump-version label to the github PR.

@michal-dagan michal-dagan marked this pull request as ready for review January 4, 2024 10:01
@michal-dagan michal-dagan changed the title added prompt=consent [Microsoft API] generate_login_url - support prompt=consent Jan 4, 2024
Copy link
Contributor

@DeanArbel DeanArbel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job

Packs/AzureDataExplorer/ReleaseNotes/1_2_35.md Outdated Show resolved Hide resolved
Packs/AzureDevOps/ReleaseNotes/1_3_13.md Outdated Show resolved Hide resolved
Packs/AzureKubernetesServices/ReleaseNotes/1_1_22.md Outdated Show resolved Hide resolved
Packs/AzureLogAnalytics/ReleaseNotes/1_1_24.md Outdated Show resolved Hide resolved
Packs/AzureNetworkSecurityGroups/ReleaseNotes/1_2_23.md Outdated Show resolved Hide resolved
Packs/MicrosoftGraphSecurity/ReleaseNotes/2_2_7.md Outdated Show resolved Hide resolved
Packs/MicrosoftGraphTeams/ReleaseNotes/1_1_1.md Outdated Show resolved Hide resolved
Packs/MicrosoftGraphUser/ReleaseNotes/1_5_28.md Outdated Show resolved Hide resolved
Packs/MicrosoftManagementActivity/ReleaseNotes/1_3_36.md Outdated Show resolved Hide resolved
Packs/MicrosoftTeams/ReleaseNotes/1_4_46.md Outdated Show resolved Hide resolved
@ShirleyDenkberg
Copy link
Contributor

@DeanArbel Doc review completed.

@content-bot
Copy link
Collaborator

This PR was automatically updated by a GitHub Action

  • MicrosoftDefenderAdvancedThreatProtection pack version was bumped to 1.16.25.

To stop automatic version bumps, add the ignore-auto-bump-version label to the github PR.

@content-bot
Copy link
Collaborator

This PR was automatically updated by a GitHub Action

  • MicrosoftTeams pack version was bumped to 1.4.53.

To stop automatic version bumps, add the ignore-auto-bump-version label to the github PR.

@michal-dagan
Copy link
Contributor Author

@DeanArbel
Force merge is needed due to the following issue: CIAC-9788.
in xsoar_ng_server_ga

@content-bot
Copy link
Collaborator

This PR was automatically updated by a GitHub Action

  • MicrosoftExchangeOnline pack version was bumped to 1.2.41.

To stop automatic version bumps, add the ignore-auto-bump-version label to the github PR.

Tests/conf.json Outdated Show resolved Hide resolved
Tests/conf.json Outdated Show resolved Hide resolved
@content-bot
Copy link
Collaborator

This PR was automatically updated by a GitHub Action

  • MicrosoftGraphSecurity pack version was bumped to 2.2.10.

To stop automatic version bumps, add the ignore-auto-bump-version label to the github PR.

@content-bot
Copy link
Collaborator

This PR was automatically updated by a GitHub Action

  • MicrosoftGraphSecurity pack version was bumped to 2.2.11.

To stop automatic version bumps, add the ignore-auto-bump-version label to the github PR.

@content-bot
Copy link
Collaborator

This PR was automatically updated by a GitHub Action

  • AzureLogAnalytics pack version was bumped to 1.1.28.

To stop automatic version bumps, add the ignore-auto-bump-version label to the github PR.

@michal-dagan michal-dagan merged commit 7537b2f into master Feb 29, 2024
17 checks passed
@michal-dagan michal-dagan deleted the add-prompt-consent-microsoft-api branch February 29, 2024 12:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants