-
Notifications
You must be signed in to change notification settings - Fork 0
Microsoft Entra ID Client Credential Login
Client Credential Login is a method that allows an application to authenticate to Microsoft Entra ID using a certificate. This authentication flow does not require user interaction and is typically used for background processes or service accounts that need to access SharePoint Online.
To use this method, you must register a Microsoft Entra ID application in your tenant and associate a certificate with the application. The certificate acts as the application's credential, enabling secure access to APIs. During app registration, you will obtain an Application ID and configure the necessary API permissions for your application.
Before you begin, please refer to Getting Started.
-
Start a PowerShell 7 prompt.
-
Run the
Connect-KshSitecmdlet.
-
Windows
Connect-KshSite -Url 'https://<tenantname>.sharepoint.com' -ClientId '<clientid>' -CertificatePath '<path>' -CertificatePassword (ConvertTo-SecureString -String '<password>' -AsPlainText -Force)
-
macOS or Linux
Connect-KshSite -Url 'https://<tenantname>.sharepoint.com' -ClientId '<clientid>' -CertificatePath '<path>' -PrivateKeyPath '<path>'