copilot api

Hadas Lapid 0 Reputation points
2025-11-02T12:43:22.87+00:00

I am trying to integrate copilot api component into my code.

it gives me credentials error

where can I find my TENANT ID and client ID?

Microsoft 365 and Office | Install, redeem, activate | For business | Windows
0 comments No comments

1 answer

Sort by: Most helpful
  1. Demi-N 20,075 Reputation points Microsoft External Staff Moderator
    2025-11-02T14:09:02.9566667+00:00

    Hello @Hadas Lapid

    Thank you for posting your question in the Microsoft Q&A Forum.

    Before we proceed, could you confirm if you have already registered the Copilot application in Microsoft Entra ID? 

    If not yet registered, here’s how you can do it: 

    • Sign in to the Microsoft Entra admin center as at least an Application Developer. 
    • Navigate to Entra ID > App registrations and select New registration

    User's image

    • Under Supported account types, choose who can use the application. 
    • Click Register to complete the app registration. 

    User's image

    Once registered, the application’s Overview page will appear. Please record the Application (client) ID and Directory (tenant) ID to validate security tokens from the Microsoft identity platform. 

    User's image

    You can find detailed steps here: How to register an app in Microsoft Entra ID - Microsoft identity platform | Microsoft Learn 

    If you have already registered the app, simply go to: 

    • Microsoft Entra admin center > App registrations > select your Copilot app. 
    • In the Overview section, you will see both the Client ID and Tenant ID. 

    Additionally, to avoid credentials error, please make sure you have: 

    • Created a Client Secret under Certificates & secrets. 
    • Granted the necessary API permissions (e.g., Microsoft Graph or Copilot API) under API permissions and clicked Grant admin consent if required. 

    For your reference: Web API app registration and API permissions - Microsoft identity platform | Microsoft Learn 

     

    I hope this information is helpful and clarifies the process for you. If you need further assistance, please don’t hesitate to contact me. If you still encounter any errors, please share a screenshot and update me so I can assist you further. 


    If the answer is helpful, please click "Accept Answer" 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?

    1 person found 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.