You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using SharePoint 2016 on-premises, and I've been successfully connecting to the SharePoint server using the following code with my own credentials. This means that my Active Directory account is verified, allowing me to access SharePoint and perform various operations on the server.
Now, I need to use a service account to connect to SharePoint, which requires passing the service account's username and password. To test this configuration, I've disabled my default login account to ensure that I'm using the service account.
However, when attempting to connect to SharePoint with the service account, I'm encountering a 403 Forbidden exception consistently. It's important to note that the service account has been granted administrative privileges on this SharePoint instance.
Here's the code snippet I'm using for authentication:
OfficeDevPnP.Core.AuthenticationManager authenticationManager = new OfficeDevPnP.Core.AuthenticationManager();
var clientContext = authenticationManager.GetWebLoginClientContext(siteUrl);
Despite granting admin privileges to the service account, this code is resulting in a 403 Forbidden error.
i got my access removed and using service account, i get this error
AADSTS50105: Your administrator has configured the application SharePoint on-premises ddddd ('2342-234234-4d1b-899b-7ab3f6ee30e9') to block users unless they are specifically granted ('assigned') access to the application. The signed in user '[email protected]' is blocked because they are not a direct member of a group with access, nor had access directly assigned by an administrator. Please contact your administrator to assign access to this application.
The text was updated successfully, but these errors were encountered:
lohith1024
changed the title
getting error
Encountering a 403 Forbidden exception consistently
Sep 15, 2023
Question
I'm using SharePoint 2016 on-premises, and I've been successfully connecting to the SharePoint server using the following code with my own credentials. This means that my Active Directory account is verified, allowing me to access SharePoint and perform various operations on the server.
Now, I need to use a service account to connect to SharePoint, which requires passing the service account's username and password. To test this configuration, I've disabled my default login account to ensure that I'm using the service account.
However, when attempting to connect to SharePoint with the service account, I'm encountering a 403 Forbidden exception consistently. It's important to note that the service account has been granted administrative privileges on this SharePoint instance.
Here's the code snippet I'm using for authentication:
OfficeDevPnP.Core.AuthenticationManager authenticationManager = new OfficeDevPnP.Core.AuthenticationManager();
var clientContext = authenticationManager.GetWebLoginClientContext(siteUrl);
Despite granting admin privileges to the service account, this code is resulting in a 403 Forbidden error.
i got my access removed and using service account, i get this error
AADSTS50105: Your administrator has configured the application SharePoint on-premises ddddd ('2342-234234-4d1b-899b-7ab3f6ee30e9') to block users unless they are specifically granted ('assigned') access to the application. The signed in user '[email protected]' is blocked because they are not a direct member of a group with access, nor had access directly assigned by an administrator. Please contact your administrator to assign access to this application.
The text was updated successfully, but these errors were encountered: