The process of building custom applications and tools that interact with Microsoft SharePoint, including SharePoint Online in Microsoft 365.
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:
- Sign in to the Microsoft Entra admin center.
- Go to Microsoft Entra ID > App registrations.
- Select the application that you are using for your PHP program.
- In the left menu, select Certificates & secrets.
- Under Client secrets, select New client secret.
- Enter a description and choose an expiration period.
- Select Add.
- 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.