<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="3.10.0">Jekyll</generator><link href="https://dr34mr.github.io//feed.xml" rel="self" type="application/atom+xml" /><link href="https://dr34mr.github.io//" rel="alternate" type="text/html" /><updated>2025-06-09T09:14:45+00:00</updated><id>https://dr34mr.github.io//feed.xml</id><title type="html">TRIM / Content Manager Tips &amp;amp; Tricks</title><subtitle>Aussie IM (Information Management) specialist who also does a LOT of development</subtitle><entry><title type="html">Using UPN Claim instead of Email for Azure OpenID</title><link href="https://dr34mr.github.io//admin/2025/01/28/Using-UPN-claim-for-OIDC-in-Enterprise-Studio/" rel="alternate" type="text/html" title="Using UPN Claim instead of Email for Azure OpenID" /><published>2025-01-28T00:00:00+00:00</published><updated>2025-01-28T00:00:00+00:00</updated><id>https://dr34mr.github.io//admin/2025/01/28/Using%20UPN%20claim%20for%20OIDC%20in%20Enterprise%20Studio</id><content type="html" xml:base="https://dr34mr.github.io//admin/2025/01/28/Using-UPN-claim-for-OIDC-in-Enterprise-Studio/"><![CDATA[<p>Got asked today about if it was possible to swap from using the email as their login to instead use the UPN in Azure.</p>

<p>Reason for this is the email address often goes through changes when staff change names or staff move to different areas within the organisation (due to different domains).</p>

<p>Outside of changing the logins of the users in Content Manager to use the UPN address instead, the updates in Azure to the Application Registration and the changes in Enterprise Studio to ensure the UPN comes back are straight forward.</p>

<h3 id="azure-app-registration-changes">Azure App Registration Changes</h3>

<p>Underneath the application registrations ‘Token configuration’ menu, add the following optional claim. Make sure the Token Type is ID (not Access or SAML).</p>

<p><img src="https://dr34mr.github.io/assets/2025-01-28-Image1.png" alt="Image" /></p>

<p>Within the API permissions, make sure the Delegated Profile permission has been added.</p>

<p><img src="https://dr34mr.github.io/assets/2025-01-28-Image2.png" alt="Image" /></p>

<h3 id="trim-enterprise-studio">TRIM Enterprise Studio</h3>

<p>Within Enterprise Studio, jump into the OpenID Authentication tab (may be under right click ➡ properties, or may be under right click ➡ authentication)</p>

<p>Update the Identity scopes to include ‘profile’ as per the screenshot</p>

<p><img src="https://dr34mr.github.io/assets/2025-01-28-Image3.png" alt="Image" /></p>

<p>Update the Identity claim from ‘email’ to ‘upn’ as per the screenshot</p>

<p><img src="https://dr34mr.github.io/assets/2025-01-28-Image4.png" alt="Image" /></p>

<p>Hit the Test Authentication button and try logging in. Note, for the login to the provider, you may still require to use the primary email for autentication, then the UPN will be what is returned from the provider to Content Manager.</p>

<p><img src="https://dr34mr.github.io/assets/2025-01-28-Image5.png" alt="Image" /></p>

<p>If the new claim comes back OK you will see a success message returned with the UPN claim value for this test user.</p>

<p><img src="https://dr34mr.github.io/assets/2025-01-28-Image6.png" alt="Image" /></p>

<p>When ready, Save + Deploy to commit the changes to the workgroup pool.</p>

<blockquote>
  <p>⚠ Warning - As always, changes should be first tested in a non-production environment to verify it works as expected</p>
</blockquote>]]></content><author><name></name></author><category term="admin" /><summary type="html"><![CDATA[Got asked today about if it was possible to swap from using the email as their login to instead use the UPN in Azure.]]></summary></entry><entry><title type="html">PS1 to remove RecRelationships based on CSV</title><link href="https://dr34mr.github.io//powershell/2024/10/31/Powershell-to-Remove-Record-Relationships/" rel="alternate" type="text/html" title="PS1 to remove RecRelationships based on CSV" /><published>2024-10-31T00:00:00+00:00</published><updated>2024-10-31T00:00:00+00:00</updated><id>https://dr34mr.github.io//powershell/2024/10/31/Powershell%20to%20Remove%20Record%20Relationships</id><content type="html" xml:base="https://dr34mr.github.io//powershell/2024/10/31/Powershell-to-Remove-Record-Relationships/"><![CDATA[<p>Every now and then I get asked to whip up a quick script which I’m more than happy to do. Especially when doing things in bulk isn’t always possible through the desktop client.</p>

<p>Now for the script, my main go-to’s are either VBA, which I write in the back of an excel spreadsheet, or PowerShell.</p>

<p>The choice between the two usually depends on if a client site allow Excel VBA macros to be run, or allows powershell scripts to be run. This is as each client site typically has a different security policy.</p>

<p>For most of my powershell scripts, they tend to be along the lines of connect to a dataset, loop through a CSV, and then do something to either records or locations based on the values in the CSV.</p>

<p>Below you will find my some sample powershell to remove record relationships from a CSV.</p>

<p>This powershell contains my current boilerplate of loading the SDK, connecting to a DB, loading the CSV file, looping through the entries, and writing out values both to console and to a log file.</p>

<p>Sample CSV layout:</p>

<p><img src="https://dr34mr.github.io/assets/2024-10-31-Image1.png" alt="Image" /></p>

<p>Sample Record Prior to Change:</p>

<p><img src="https://dr34mr.github.io/assets/2024-10-31-Image2.png" alt="Image" /></p>

<p>Sample Output:</p>

<p><img src="https://dr34mr.github.io/assets/2024-10-31-Image3.png" alt="Image" /></p>

<p>Sample Log File that gets created:</p>

<p><img src="https://dr34mr.github.io/assets/2024-10-31-Image4.png" alt="Image" /></p>

<p>Sample PS1 script can be found <a href="https://dr34mr.github.io/assets/2024-10-31-RemoveRelationships.ps1">here</a></p>

<p>Sample CSV that this script used can be found <a href="https://dr34mr.github.io/assets/2024-10-31-RemoveRelationships.csv">here</a></p>

<blockquote>
  <p>⚠ Warning - As always, scripts should first be run in a non-production environment to verify they work as intended</p>
</blockquote>]]></content><author><name></name></author><category term="powershell" /><summary type="html"><![CDATA[Every now and then I get asked to whip up a quick script which I’m more than happy to do. Especially when doing things in bulk isn’t always possible through the desktop client.]]></summary></entry><entry><title type="html">Thin Office Integration BUT Cross Domain for CM23.4!</title><link href="https://dr34mr.github.io//thinintegration/2024/10/25/Thin-Office-Cross-Domain/" rel="alternate" type="text/html" title="Thin Office Integration BUT Cross Domain for CM23.4!" /><published>2024-10-25T00:00:00+00:00</published><updated>2024-10-25T00:00:00+00:00</updated><id>https://dr34mr.github.io//thinintegration/2024/10/25/Thin%20Office%20Cross%20Domain</id><content type="html" xml:base="https://dr34mr.github.io//thinintegration/2024/10/25/Thin-Office-Cross-Domain/"><![CDATA[<p>So … you want to enable the Content Manager ThinOffice Integration but you are trying to have it used Cross-Domain?</p>

<p>Bad News: It needs a few extra steps (which i found out weren’t greatly documented)
Good News: The steps are below and can be done using AzureAD! 😁</p>

<h2 id="step-1---enable-the-web-client-to-use-azuread-for-authentication">Step 1 - Enable the Web Client to use AzureAD for Authentication</h2>

<p>Follow the steps <a href="https://content-manager-sdk.github.io/Community/233/oidc.html#oidc_azuread">here</a> to configure your 23.4 Content Manager WebClient to use AzureAd for authentication.</p>

<p><img src="https://dr34mr.github.io/assets/2024-10-25-Image1.png" alt="Image" /></p>

<h2 id="step-2---portalazurecom-app-registration-updates">Step 2 - portal.azure.com App Registration Updates</h2>

<p>Jump into the AzureAD App Registration you spun up for the WebClient</p>

<h3 id="double-check-the-redirect-uris">Double check the Redirect URIs</h3>

<p>For my own application registration, there are 2x Redirect URIs for the WebClient (one with www and one without) but both go to /contentmanager/serviceapi/auth/openid</p>

<p>And since I’m also using this for my dekstop app, I’ve got urn:ietf:wg:oauth:2.0:oob added as a Desktop redirect as well</p>

<p><img src="https://dr34mr.github.io/assets/2024-10-25-Image2.png" alt="Image" /></p>

<h3 id="api-permissions">API Permissions</h3>

<p>Make sure the following Delegated permissions are present: email, offline_access, openid, profile, User.Read</p>

<p>Make sure the status shows as Granted for your domain. If not, there is a button to ‘Grant admin consent’ next to the ‘Add Permission’ button</p>

<p><img src="https://dr34mr.github.io/assets/2024-10-25-Image3.png" alt="Image" /></p>

<h3 id="expose-an-api">Expose an API</h3>

<p>In the Expose an API tab, up the top, where there is an Application ID URI, press ‘Add’. This should auto fill in an api:// URI based on the client ID of the application registration (we will need this later).</p>

<p><img src="https://dr34mr.github.io/assets/2024-10-25-Image4.png" alt="Image" /></p>

<h2 id="step-3---adfs_configxml">Step 3 - adfs_config.xml</h2>

<p>We need to make sure that in the ThinOffice Roaming Directory (C:\Users\Scotty\AppData\Roaming\Micro Focus\Content Manager\OfficeIntegration) we create an adfs_config.xml with the following details (NB. A ‘blank’ one of these can be found in your WebClients ADFS directory C:\Program Files\Micro Focus\Content Manager\Web Client\ADFS)</p>

<p>How you deploy this out to end users is up to yourself.</p>

<p><img src="https://dr34mr.github.io/assets/2024-10-25-Image5.png" alt="Image" /></p>

<p><img src="https://dr34mr.github.io/assets/2024-10-25-Image6.png" alt="Image" /></p>

<p>The <strong>clientAuthority</strong> is the AuthorityURL found from your Application Registrations Endpoint for this organizational directory only (App Registraion -&gt; Overview -&gt; Endpoint Button up the top)</p>

<p><img src="https://dr34mr.github.io/assets/2024-10-25-Image7.png" alt="Image" /></p>

<p><img src="https://dr34mr.github.io/assets/2024-10-25-Image8.png" alt="Image" /></p>

<p>The <strong>clientResourceUri</strong> and <strong>clientID</strong> is your Azure App Registraion Client ID (same value for both)</p>

<p>The <strong>clientReturnUri</strong> is <strong>urn:ietf:wg:oauth:2.0:oob</strong></p>

<h2 id="step-4---preferences">Step 4 - preferences</h2>

<p>In the same directory as the adfs_config.xml open up the preferences file in your favourite notepad editor.</p>

<p><img src="https://dr34mr.github.io/assets/2024-10-25-Image9.png" alt="Image" /></p>

<p>Fill in the RMClientURL property. It needs to point to the landing page for your CM Web Client (note, no ending slash)</p>

<p><img src="https://dr34mr.github.io/assets/2024-10-25-Image10.png" alt="Image" /></p>

<h2 id="step-5---update-the-webclient-hprmserviceapiconfig">Step 5 - Update the WebClient hprmServiceAPI.config</h2>

<p>Now back onto the WebClient server, open up the mprmServiceAPI.config file. Find the existing ‘openIdConnect add’ stubb and add an additional value entry for appIdURI (CASE SENSITIVE) as per below</p>

<p><img src="https://dr34mr.github.io/assets/2024-10-25-Image11.png" alt="Image" /></p>

<p>This is the same value in the ‘Exponse an API’ in AzureAD with the Application ID URI</p>

<h2 id="step-6---pray--and-give-it-a-go">Step 6 - PRAY 🙏 and give it a go</h2>

<p>Now, when I open Word and click on ‘New Document’ I’m now presented with a login screen. Once logged in, the Integration should light up.</p>

<p><img src="https://dr34mr.github.io/assets/2024-10-25-Image12.png" alt="Image" /></p>

<p>When Word is next launched, it should now also auto-log-in remembering your previous credentials.</p>

<p>If you ever need to remove the saved credentials from the machine they are saved in the same Roaming directory as ToekCache.dat. Deleting this will clear the saved credentials.</p>

<p><img src="https://dr34mr.github.io/assets/2024-10-25-Image13.png" alt="Image" /></p>]]></content><author><name></name></author><category term="thinintegration" /><summary type="html"><![CDATA[So … you want to enable the Content Manager ThinOffice Integration but you are trying to have it used Cross-Domain?]]></summary></entry><entry><title type="html">Up and running!</title><link href="https://dr34mr.github.io//non-trim/2022/06/20/Up-And-Running/" rel="alternate" type="text/html" title="Up and running!" /><published>2022-06-20T00:00:00+00:00</published><updated>2022-06-20T00:00:00+00:00</updated><id>https://dr34mr.github.io//non-trim/2022/06/20/Up-And-Running</id><content type="html" xml:base="https://dr34mr.github.io//non-trim/2022/06/20/Up-And-Running/"><![CDATA[<p>So - I kind of knew that I was interested in hosting a ‘blog’ directly on my own GitHub but it wasn’t something that I can say that I was activley looking into.</p>

<p>Still got a bunch of config to adjust, set up a propper root URL, as well as looking at implementing some CSS.</p>

<p>Who knew I could fork a repo that others already had set up to get myself off the ground.</p>

<p>If you have your own GitHub and want to turn your home page into a Blog head over to to the <a href="https://github.com/barryclark/jekyll-now">Jekyll Now repo</a> to get started.</p>]]></content><author><name></name></author><category term="non-trim" /><summary type="html"><![CDATA[So - I kind of knew that I was interested in hosting a ‘blog’ directly on my own GitHub but it wasn’t something that I can say that I was activley looking into.]]></summary></entry></feed>