Hi @lakshmi
The application permission for the "Get presence" API is currently available and it works fine for me.
var scopes = new[] { "https://graph.microsoft.com/.default" };
var tenantId = "{tenant id}";
// Values from app registration
var clientId = "{client id}";
var clientSecret = "{client secret}";
// using Azure.Identity;
var options = new TokenCredentialOptions
{
AuthorityHost = AzureAuthorityHosts.AzurePublicCloud
};
// https://learn.microsoft.com/dotnet/api/azure.identity.clientsecretcredential
var clientSecretCredential = new ClientSecretCredential(
tenantId, clientId, clientSecret, options);
var graphClient = new GraphServiceClient(clientSecretCredential, scopes);
var result = await graphClient.Users["{user id}"].Presence.GetAsync();
Please try upgrading your graph SDK to above 5.0 and remove the Request()
method.
Hope this helps.
If the reply is helpful, please click Accept Answer and kindly upvote it. If you have additional questions about this answer, please click Comment.