
ProjectContext.Miller Certainly most of these things can be achieved with delegate permissions but that doesn’t mean they should.įor example, in the UC use case we operate a UC platform that provides open APIs for any application with permissions to be able to get or set the presence of a user. ProjectContext projectContext = new(siteUrl)

String redirectUri = " pcaConfig.WithRedirectUri(redirectUri) įoreach (char c in password) sc.AppendChar(c) ĪuthenticationResult tokenResult = pcaConfig.Build() PublicClientApplicationBuilder pcaConfig = PublicClientApplicationBuilder.Create(clientId) ProjectCollection projects = myProjectContext.Projects Īwait myProjectContext.ExecuteQueryAsync() Īnd this public ProjectContext GetProjectContext(string siteUrl, string clientId, string userName, string password, string tenantId, string scope) ProjectContext myProjectContext = _projectOnlineUtils.GetProjectContext I'm pretty stumped, I'd be grateful for a we solved it after weeks of trying. It seems obvious that I've not added the correct permissions, but I've given every permission I can find to my user through the admin website, not only to the project site but to the root site. That's using login cookies I guess, not oauth. Also when I'm logged in as that user, I can navigate to the above link and get the data inside the browser.

The user I'm logging in with is the company administrator, and has also been added as a site admin for the Project site explicitly by name.

However when I try to access I get an authorization error, code 20010, "Access Denied". I understand Oauth2 and I'm successfully getting an authorization token using a client id and secret that I obtained via the I can use the bearer token to do a GET on without a problem. I'm having a lot of trouble trying to access Project Online data through the REST interface.
