getting client secret ?

Sapto Nugroho 0 Reputation points
2026-07-23T04:51:22.1+00:00

Dear Sir/Mam

For creating List with PHP program, I have to get "Token" first. In order to get Token,

I have to provide : Tenant ID, Client ID, Client Secret. I dont have Client Secret, how to get my Client Secret ?

Regards

sapto

Microsoft 365 and Office | SharePoint | Development
0 comments No comments

1 answer

Sort by: Most helpful
  1. Michelle-N 20,645 Reputation points Microsoft External Staff Moderator
    2026-07-23T08:10:02.93+00:00

    Hi @Sapto Nugroho

    Based on the information you provided, I understand that you are developing a PHP application that needs to obtain an access token before creating a SharePoint list. To acquire the token, you need the Tenant ID, Client ID, and Client Secret, and your main question is how to obtain the Client Secret for your application.

    To get a Client Secret, you need to create one from the app registration in Microsoft Entra ID.

    Please follow these steps:

    1. Sign in to the Microsoft Entra admin center.
    2. Go to Microsoft Entra ID > App registrations.
    3. Select the application that you are using for your PHP program.
    4. In the left menu, select Certificates & secrets.
    5. Under Client secrets, select New client secret.
    6. Enter a description and choose an expiration period.
    7. Select Add.
    8. Copy the value shown in the Value column immediately.

    Important: the client secret value is shown only once. If you leave the page without copying it, you cannot view it again. In that case, you must create a new client secret. Microsoft documentation also notes that client secrets are less secure than certificates and recommends using certificates or federated credentials for production applications where possible.

    Also, please make sure you are copying the secret Value, not the Secret ID. The Client ID is available from the app registration Overview page as Application (client) ID, while the Tenant ID is shown as Directory (tenant) ID.

    If you do not see the option to create a client secret, your account may not have enough permissions, or your organization may block client secrets by policy. In that case, please contact your tenant administrator to create the secret for you or use a certificate instead.

    Please refer the following document:

    Add and manage application credentials in Microsoft Entra ID


    If the answer is helpful, please click "Yes" and kindly upvote it. If you have extra questions about this answer, please click ""Comment"".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    Was this answer helpful?


Your answer

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