An on-premises daemon application needs to access a secure Web API protected by Microsoft Entra ID. The application is registered in Microsoft Entra ID and has a client secret configured. Arrange the steps in the correct chronological order to authenticate the application and access the Web API using the client credentials flow.
- 1The daemon application sends a POST request containing the client ID, client secret, and scope to the Microsoft Entra ID token endpoint.
- 2Microsoft Entra ID validates the credentials and returns a JSON Web Token (JWT) access token to the application.
- 3The daemon application sends an HTTP request to the Web API with the access token in the Authorization header.
- 4The Web API validates the token and returns the requested resource data.
Cevap
First, the daemon application requests an access token by sending its client credentials to the token endpoint. Next, Microsoft Entra ID validates the credentials and returns the token. The daemon application then includes this token in the Authorization header of its request to the Web API. Finally, the Web API validates the token and returns the requested data.
In the client credentials flow, the application must first request an access token from Microsoft Entra ID by presenting its own credentials (client ID and client secret). Once Microsoft Entra ID validates these credentials, it issues an access token. The application then uses this token in the Authorization header of its request to the Web API, and finally, the Web API validates the token to authorize the access.
Adım Adım Çözüm
Anahtar Kavram
The client credentials flow enables a daemon application (represented by an application registration and service principal) to acquire an access token to call a Web API without user interaction.
Tahmini Süre:1m 0s