Configure a non-interactive client login
To enable non-interactive client logins using client credential flows with your Sitecore instance, you must add additional configurations to your Identity Server and Content Management instances.
To configure a non-interactive client login:
-
On the Sitecore Identity Server, in the
Config/folder, create a file namedSitecore.IdentityServer.DevEx.xmlcontaining the following: -
Name the
<CliServerClient>element anything that you like.NoteYou can make unlimited client configurations under the
<Clients>element as long as they are uniquely named. -
In the
<ClientId>element, enter the unique ID of your client. -
In the
<ClientSecrets>element, create a<ClientSecret1>element containing the secret of your client.NoteThe maximum supported length for a client secret is 100 characters.
-
Save the
Sitecore.IdenityServer.DevEx.xmlfile. -
On the Sitecore Content Management server, in the
App_Config/Include/folder, create a file namedSitecore.Owin.Authentication.ClientCredentialsMapping.configcontaining the following: -
In the
<claim name="client_id">element, in thevalueattribute, enter the unique ID of your client. -
Check your SQL Membership provider in the
web.configfile. If the solution has therequiresUniqueEmailattribute set totrue, add the following configuration line to theSitecore.Owin.Authentication.ClientCredentialsMapping.configfile: -
Save the
Sitecore.Owin.Authentication.ClientCredentialsMapping.configfile. -
Restart the Sitecore Identity Server and the Content Management roles.
-
Recycle the Sitecore Identity Server application pool.
-
Validate your configuration by performing the client login procedure described in the CLI authentication and authorization documentation.