Project Online
25 TopicsProject Online (CSOM): Encountering 'User Not Found in Active Directory or Project DB'
Issue We are attempting to access Project Online data in Project Permission mode using app-only authentication, specifically to bypass MFA for programmatic access, as we aim for continuous, automated access without any user-interaction. We are using CSOM, using Microsoft.ProjectServer.Client.ProjectContext in .NET 4.8 to connect to Project Online. Despite following several documented approaches with client certificates, client secrets, and OAuth configurations, we keep encountering errors like 401 Unauthorized and User not found in Active Directory or in project db. Below is a summary of our steps. Despite multiple attempts, we consistently receive errors blocking access. We have followed recommended documentation for client credentials, certificates, and permissions but still face access issues. Technology Project Online CSOM in .NET 4.8 Microsoft.ProjectServer.Client.ProjectContext Azure AD (Entra ID) Solutions Attempted Client Certificate Authentication: Configuration: Registered an app in Azure AD (Entra) with a client certificate and set permissions including Sites.FullControl.All. NOTE: we could not select Project permissions (Project.Read, etc.) in the Application Permissions screen, only within the delegated permissions screen. Token Acquisition: We acquired an access token using az account get-access-token --resource=https://.sharepoint.com. Request Attempted: URL:https://.sharepoint.com/sites//_api/ProjectData/Projects Outcome: {"error":"invalid_request","error_description":"App is not allowed to call SPO with user_impersonation scope"} Client Secret with Client Credentials: App Registration: Configured client ID and client secret in Azure AD with permissions for Project.ReadWrite.All and Sites.Selected. Token Acquisition: Called the token endpoint: Endpoint:https://login.microsoftonline.com/{TENANT_ID}/oauth2/v2.0/token Parameters: client_id, scope=https://.sharepoint.com/.default, client_secret, grant_type=client_credentials Access Attempt: URL:https://.sharepoint.com/sites//_api/ProjectData/Projects Response: HTTP/1.1 401 Unauthorized Response Body: "" Outcome: Despite obtaining a valid token, the request returns a “Please sign in” page, rather than an access token. SharePoint AppPermissionRequest Configuration using /sites/pwa/layouts/15/appinv.aspx: Configuration: Set up AppPermissionRequest XML in SharePoint for permissions like: Outcome: This configuration did not make any differences, and did not grant the required permissions in Project Permission mode, as SharePoint app permissions do not seem to cover Project-specific access, it seems. Project Online access remains blocked. <AppPermissionRequest Scope="[http://sharepoint/content/sitecollection]" Right="FullControl"/> Microsoft Graph API Exploration: Goal: Investigated Graph API as an alternative. Outcome: Microsoft Graph lacks Project Online-specific permissions, limiting access to SharePoint and directory data, which does not meet our need for project-specific data access. Microsoft.Identity.Client and client certificate Configuration: CSOM using the following code to login: Outcome: Access fails withUser:<customercontent></customercontent> not found in Active Directory or in project db public static void Login(this ProjectContext context) { var clientId = "xxx"; var clientSecret = "xxx"; var authority = "https://login.microsoftonline.com/xxx"; var scope = "https://xxx.sharepoint.com/.default"; var certificate = new X509Certificate2("c:\\temp\\cert.pfx", "xx"); var app = ConfidentialClientApplicationBuilder.Create(clientId) .WithCertificate(certificate) .WithAuthority(new Uri(authority)) .Build(); AuthenticationResult result = TaskHelper.BlockingAwait(() => app.AcquireTokenForClient(new[] { scope }).ExecuteAsync()); string accessToken = result.AccessToken; context.ExecutingWebRequest += (sender, e) => { e.WebRequestExecutor.RequestHeaders["Authorization"] = "Bearer " + accessToken; }; } Key Questions: Is there a method for app-only authentication in Project Online in Project Permission mode__ that bypasses MFA for automated access? Has anyone succeeded in applying app-only credentials for Project Online access__, specifically in Project Permission mode? Are there any alternative permission configurations__ (like Azure AD settings, conditional access policies, or app permissions) that could facilitate this access? Thank you in advance! Edit: Sorry for the bad formatting.32Views0likes0CommentsModify indentation in Project Online via REST API's
Hello community, Need assistance in updating a Task indentation in Microsoft Project Online(PWA) via REST API's. My goal is to change the task indentation from OutlinePosition1to OutlinePosition1.1and vice versa. Tried something from the article here, where he managed to indent the task while creating it, where as I need to manage the indentation while updating it. Expected Output Required Thanks in advance. Note: I'm trying to achieve this using PowerPlatform681Views0likes1CommentNew Project - Regex on Project Name - Limit Special Characters
Greetings, I haven't been able to find any reference to this anywhere online... When creating a new Project in PoL/PWA, is there a way to apply RegEx to the 'Name' (Project Name) field? Basically: I would like to limit it to Alpha-Numeric, Spaces and Dashes...and definitely prevent '&' and brackets '()[]'. Either make it required or prevent 'finish' button (Create project) from functioning until it is valid. What might be a strategy to go about this validation? (Note: I am somewhat surprised this has never been discussed before...especially considering that PWA creates a sub-site & use the 'Name' field as the URL. Frankly, it is surprising that PWA even allows '&'.) Much appreciated, -TRSolved538Views0likes2CommentsProject Online - Baseline Start and Finish fields are "blank" in the Project Center dashboard
We added 2 columns to the Summary view in Project Center, to show the Baseline Start and Baseline Finish fields. However, both columns in the Project Center are "blank" (empty) for all the projects, although the Baseline has been created for all the projects and the Baseline Start and Finish data is available and shown in each of the projects schedule. Any assistance will be much appreciated.Solved764Views0likes6CommentsProject Online: To make timesheet active I have to enter hours for any assigned task
Basically, I am working on integrating project online with application. I am facing issue with the activation of timesheet for new week. On Project Online to make timesheet active I simply have to add hours on the assigned task. But on my application I am getting error while retrieving the new timesheet that resource not found. Can anyone guide me with this?357Views0likes1CommentIs there a way to get project online module storage size/ occupied size ?
Hi Team, we have a sharepoint site also installed ProjectOnline Web template module. we would like to know if there is a way to know size occupied(Projects) on SharePoint site? In-Shortly: we have a SP Online site with Project online web template module on SPO site. from project center we have many projects, few are closed rest all Active. we would like to know list of projects on how much space those are been occupied you`r reply will be appritiate Thanks, KrishnaSolved1.4KViews0likes5CommentsProject Online - Creating project site failed
Hello, Am struggling to create Project Site associated with Project. Every time whenever new project gets created in environment, in manage queue I will find below failure message "The attempted operation is prohibited because it exceeds the list view threshold." Please have look at below screenshot for more information. Any help is appreciated, Thanks in Advance.Solved1.5KViews0likes8CommentsProject Online REST API
Hi all. I'm currently working on an integration with Project Online using a low code/no code product (that is capable of doing HTTP requests) and Project Online REST API using OAUth client credentials (Machine to Machine authentication). I'm a complete rookie to Project Online, can someone please point me in the direction of detailed documentation that: - Identifies what kind of license is required to access Project Online REST API - Identifies what (if any) needs to be configured on Project Online - Identifies what (if any) needs to be configured on SharePoint - Identifies the steps to get the OAuth token to interact with Project Online REST API Thanks in advance Vicente5.4KViews0likes3CommentsOffline MPP files are not opening from OneDrive and SharePoint sites
Hello All, Need assistance, I have saved a MPP plan as offline file in Onedrive and SharePoint site. When I am trying to open the file from Onedrive or SharePoint getting below error. Name of the file is correct and the MPP is latest version. But getting the below error . Can anyone help me on this will be much appreciated and helped me.782Views0likes0CommentsPublish summary information for the project with REST in Power Automate
Hi, I am trying to update the calculated custom fields for ongoing Projects and would like to know if there is a REST operation (or any other way) that could do the same as theSharePoint Designer 2013 action "Publish Project Summary": The requirement is to update the calculated Custom Fields without Publishing the Project Plan as we have some KPIs related to when was the last time the Project Manager published the Project Plan. There is a calculated Custom Field that sets the Project to Late or Overdue based on the current date, so if the Project Manager did not update the Project Plan or saved Project data in a PDP the calculated Custom Field is not refreshed and the value is not accurate. The goal is to daily run a Power Automate action that refreshes this calculated Custom Field on Projects that were not udpated so the value remains accurate. UPDATE: I am trying to update a Custom Field with ProcessQuery to check if the other Custom Fields get refreshed when using the Update method: But getting the following error about the Constructor TypeId: "ErrorMessage": "The 'TypeId' attribute is invalid - The value '{3a609e855f-e2a1-497c-87a2-e5e8a781d096}' is invalid according to its datatype 'http://schemas.microsoft.com/sharepoint/clientquery/2009:TypeIdGuidType' - The Pattern constraint failed.", This the XML body: <Request xmlns="http://schemas.microsoft.com/sharepoint/clientquery/2009" SchemaVersion="15.0.0.0" LibraryVersion="16.0.0.0" ApplicationName="Javascript Library"> <Actions> <Method Name="SetCustomFieldValue" Id="14" ObjectPathId="8"> <Parameters> <Parameter Type="String">Custom_6ef30e58-88a9-ed11-98fd-00155d9c3d86</Parameter> <Parameter Type="String">Updated via Power Automate on @{utcNow()}</Parameter> </Parameters> </Method> <Method Name="Update" Id="15" ObjectPathId="6" /> </Actions> <ObjectPaths> <Property Id="4" Name="Projects" ParentId="0" /> <Method Id="8" ParentId="6" Name="GetById"> <Parameters> <Parameter Type="String">@{items('Apply_to_each')?['Id']}</Parameter> </Parameters> </Method> <Constructor Id="0" TypeId="{3a609e855f-e2a1-497c-87a2-e5e8a781d096}" /> </ObjectPaths> </Request> Where can I find the appropriate Constructure TypeId value? In the suggested URL, the service is unavailable: https://schemas.microsoft.com/sharepoint/clientquery/2009:TypeIdGuidType Thank you in advance!862Views0likes0Comments