diff --git a/public/app/features/serviceaccounts/ServiceAccountCreatePage.test.tsx b/public/app/features/serviceaccounts/ServiceAccountCreatePage.test.tsx index ccb200df8f4..7d53a87ffa2 100644 --- a/public/app/features/serviceaccounts/ServiceAccountCreatePage.test.tsx +++ b/public/app/features/serviceaccounts/ServiceAccountCreatePage.test.tsx @@ -83,7 +83,7 @@ describe('ServiceAccountCreatePage tests', () => { await waitFor(() => expect(postMock).toHaveBeenCalledWith('/api/serviceaccounts/', { name: 'Data source scavenger', - role: 'None', + role: 'Viewer', }) ); }); diff --git a/public/app/features/serviceaccounts/ServiceAccountCreatePage.tsx b/public/app/features/serviceaccounts/ServiceAccountCreatePage.tsx index 70425722dca..725969145f0 100644 --- a/public/app/features/serviceaccounts/ServiceAccountCreatePage.tsx +++ b/public/app/features/serviceaccounts/ServiceAccountCreatePage.tsx @@ -29,7 +29,7 @@ export const ServiceAccountCreatePage = ({}: Props): JSX.Element => { const [serviceAccount, setServiceAccount] = useState({ id: 0, orgId: contextSrv.user.orgId, - role: OrgRole.None, + role: contextSrv.licensedAccessControlEnabled() ? OrgRole.None : OrgRole.Viewer, tokens: 0, name: '', login: '',