Forum Discussion
403 Forbidden error occured when using REST API
Hi,
I'm aslo facing same issue. Any solution to this?
modifying the authentication to prompt for credentials allowed me to get past the 'Forbidden' error...
return ac.AcquireTokenAsync(resourceUriPowerBi, clientId, new Uri(RedirectURL), new PlatformParameters(PromptBehavior.Auto)).Result.AccessToken;
- wakhan079 years agoFrequent Visitor
Thanks for your kind reply,
I don't see forbidden error anymore. However, we have WebAPI's returning token and we don’t want to get the popup at all.
When I set the prompt behavior to "NEVER" I get below error:
"user_interaction_required: One of two conditions was encountered: 1. The PromptBehavior.Never flag was passed, but the constraint could not be honored, because user interaction was required. 2. An error occurred during a silent web authentication that prevented the http authentication flow from completing in a short enough time frame"
And when I tried Directly specifying the username and password, it never returns any result.
var authenticationResult = authenticationContext.AcquireTokenAsync(resourceUri, clientID, credential).Result;
this throws an error ""AADSTS75005: The request is not a valid SAML 2.0 protocol message."
I look forward for your reply,
Thanks for your support.