Show missing OAuth scopes after connector reconnect
Partial grants completed without feedback, leaving Reconnect required unexplained. Keep the token and toast the backend missing-scopes error after the OAuth callback redirect. Signed-off-by: Sacha Al Himdani <sacha@probo.com>
This commit is contained in:
@@ -98,3 +98,19 @@ func TestCampaignClientErrors(t *testing.T) {
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func TestMissingOAuthScopesError(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
err := accessreview.NewMissingOAuthScopesError([]string{
|
||||
"https://graph.microsoft.com/AuditLog.Read.All",
|
||||
"openid",
|
||||
})
|
||||
|
||||
assert.Equal(
|
||||
t,
|
||||
"Missing required OAuth scopes: AuditLog.Read.All, openid",
|
||||
err.Error(),
|
||||
)
|
||||
assert.ErrorIs(t, err, accessreview.ErrMissingOAuthScopes)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user