SharePoint linked service input is not a valid Base-64

Minor Gómez 20 Reputation points
2025-02-28T21:14:26.6466667+00:00

Hello Team,

We are trying to connect to a sharePoint list, when testing connection we are getting the below error message:

The input is not a valid Base-64 string as it contains a non-base 64 character, more than two padding characters, or an illegal character among the padding characters.

Some details:

Site URL
Service principal credential type: Service principal certificate (Recommended) / Azure Key Vault

Using secret name, secret version.

Please let us know how to resolve.

Or propose a method to connect with sharePoint List.

Thanks

Azure Synapse Analytics
Azure Synapse Analytics
An Azure analytics service that brings together data integration, enterprise data warehousing, and big data analytics. Previously known as Azure SQL Data Warehouse.
5,246 questions
{count} votes

Accepted answer
  1. Amira Bedhiafi 30,261 Reputation points
    2025-03-02T12:50:18.0033333+00:00

    I think that the certificate or secret you are using is not correctly encoded in Base-64. You can use online tools or PowerShell to verify the encoding.

    
    $certPath = "path\to\your\certificate.pfx"
    
    $certBytes = [System.IO.File]::ReadAllBytes($certPath)
    
    $base64Cert = [System.Convert]::ToBase64String($certBytes)
    
    $base64Cert
    
    

    If you are using Azure Key Vault to store the certificate or secret, verify that the secret is correctly stored and retrieved.

    
    $secret = Get-AzKeyVaultSecret -VaultName "YourKeyVaultName" -Name "YourSecretName"
    
    $secretValue = $secret.SecretValueText
    
    $secretValue
    

    Or, instead of using a certificate, you can use a client secret for authentication. Ensure that the client secret is correctly configured in Azure Active Directory and Azure Key Vault.

    You can also use OAuth 2.0 authentication to connect to SharePoint. This method involves registering an application in Azure AD and obtaining an access token.

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.