Hi @KASUKURTI Monica ,
Welcome to the Microsoft Q&A Platform! Thank you for asking your question here.
I'm sorry to hear you're having trouble with the Microsoft Graph API. A "forbidden" error usually means that your app doesn't have the necessary permissions. Here are some steps you can take to resolve this issue:
- Make sure your app has the required permissions for the Microsoft Graph API. You can do this in the Azure Portal by going to "API permissions" under your app's registration.
- Some permissions need admin approval. Make sure that you or an administrator has granted the necessary permissions in the Azure Portal.
- Check that the token your app is using includes all the required scopes. You can decode your token to see the scopes it has and ensure they match what’s needed for the endpoint you’re trying to access.
- Make sure you’re using the right type of token. Some endpoints require application tokens, while others need delegated tokens. Depending on what you’re trying to do, you might need to use the OAuth 2.0 authorization code flow or the client credentials flow.
Please refer the below thread once:
If you find the answer helpful, kindly click "Accept Answer" and upvote it. If you have any further questions or concerns, please feel free to reach out to us. We are happy to assist you.