Skip to content

Commit

Permalink
Use incremental consent for User.ReadBasic.All
Browse files Browse the repository at this point in the history
  • Loading branch information
gunndabad committed Aug 16, 2023
1 parent 1a9ca51 commit 2ab4f2b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
using Microsoft.Identity.Web;
using TeachingRecordSystem.Core;
using TeachingRecordSystem.SupportUi.Services.AzureActiveDirectory;

namespace TeachingRecordSystem.SupportUi.Pages.Users.AddUser;

[Authorize(Roles = UserRoles.Administrator)]
[AuthorizeForScopes(Scopes = new[] { "User.ReadBasic.All" })]
public class IndexModel : PageModel
{
private readonly IUserService _userService;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@

if (!builder.Environment.IsUnitTests() && !builder.Environment.IsEndToEndTests())
{
var graphApiScopes = new[] { "User.Read", "User.ReadBasic.All" };
var graphApiScopes = new[] { "User.Read" };

builder.Services.AddAuthentication(OpenIdConnectDefaults.AuthenticationScheme)
.AddMicrosoftIdentityWebApp(builder.Configuration, "AzureAd")
Expand Down

0 comments on commit 2ab4f2b

Please sign in to comment.