developer
72 TopicsHow to extract the value of RBS in Enterprise Resource in Project Server 2019?
I try to retrieve the value of RBS in Enterprise Resource in Project Server by using C#/ CSOM. Unfortunately, I just got the Resource Name, as for the value of RBS, I always cannot extract any value from this field. Sometimes, the value of RBS is wrong or the same. I shared the code for you to look at and hope the seasoned people can help me to address it or sharing some idea in this. I appreciate your help. Thanks. Explanation: The Enterprise Resources will be extracted by ID. "projectContext" will load specificRes with all Custom Fields. I'm going to retrieve the value of a specific field (RBS) Finally, When I specify to retrieve the value of "RBS", no matter how I change the Resource Id, the value of RBS is the same Is there any idea on this issue? Thanks for everyone's help. var specificRes = projectContext.EnterpriseResources.GetById(new Guid("46914ae8-3c55-488d-a045-4d1a5aaf1e74").ToString()); projectContext.Load(specificRes, r => r.Name, r => r.CustomFields, r => r.CustomFields.IncludeWithDefaultProperties( lu => lu.LookupTable, lu => lu.LookupEntries)); projectContext.ExecuteQuery(); var cusField = specificRes.CustomFields.FirstOrDefault(cf => cf.InternalName == "Custom_000039b78bbe4ceb82c4fa8c0c400284"); projectContext.Load(cusField); projectContext.ExecuteQuery(); Console.WriteLine(cusField.LookupEntries.First().FullValue);48Views0likes7CommentsProject 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.33Views0likes0CommentsOpening and Viewing Option for Two MS Project Files Simultaneously on Two Screens?
Hi Can two MS Project files be opened on two different screens at the same time? This option is should be there as it is for other usual MS software like Word, Excel etc. Hope this can be fixed as will ease out while working from two parallel files simultaneously. Appreciate if this can be looked at, please asap. Looking forwardSolved143KViews0likes40CommentsConnect Project Online (PWA) using CSOM (C#) with MFA
Hello community, I need to work with MS Project Online (PWA) over API, CRUD projects, CRUD tasks and etc. I can connect to Project with using CSOM as described here: https://learn.microsoft.com/en-us/sharepoint/dev/sp-add-ins/using-csom-for-dotnet-standard?source=recommendations And it works fine until MFA is enabled. Once MFA is enabled in Azure, the connection fails: "error": "interaction_required", "error_description": "AADSTS50076: Due to a configuration change made by your administrator, or because you moved to a new location, you must use multi-factor authentication to access I'm searching proper and working way to pass 2-factor auth (as example it works fine with Schedule API from the box) Package "SharePointPnPCoreOnline" that containsGetWebLoginClientContext method is deprecated (https://www.nuget.org/packages/SharePointPnPCoreOnline/3.28.2012) Package "PnP.Framework" does not contain (I can't see) ability to pass 2-factor auth and retrieve token (https://www.nuget.org/packages/PnP.Framework/1.17.0) and returns same error as above. Can anyone tell me how to pass 2-factor authentication using C#, CSOM to get ProjectContext worked? Thank you145Views0likes0CommentsProject Online Task notes update using Rest Api
Hello, I am able to create a new task and then I can give the value for notes field which works fine but when I try to update the same "Notes " field then the update doesnt happen using the rest api I am using below rest api with Patch method _api/ProjectServer/Projects(<project_id>)/Draft/Tasks(<Task_id>) Body: {'Notes': value}2.5KViews0likes2CommentsHave you got any tips for Pizza Tower?
Prepare for an adrenaline-pumping adventure in Pizza Tower! Challenge yourself in a wacky trip where you will face challenges that will outlast previous games. Not only can you create delicious pizzas, but you can also smash through tough obstacles, explore intriguing dungeons, and fight in epic battles. Get ready to put your abilities to the test and rule the tower! The game necessitates the application of strategy and ingenuity to navigate intricate terrain and resolve challenging puzzles. Everything in the game, from gathering rare materials to battling formidable opponents, is meant to challenge and engage you. This platform game blends the cooking and adventure themes with an appealing sense of discovery. Allow this game to lead you on an addictive journey where each triumph brings you closer to being a pizza master. Prepare yourself to experience the fascinating world of pizza tower right now! Have you got any tips for someone who just got Pizza Tower?152Views0likes1CommentModify 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 PowerPlatform681Views0likes1Commentleveling multiple resourses
I am creating a schedule for my construction company for the 2024 season. They want to level Foreman, materials, and equipment. I can add the resources and tag them under types. How do I level multiple resources at the same time? Example: How to see what equipment is available and foreman are available in August.490Views0likes4Comments