What you are setting up
In this guide, you will be setting up an Azure Files source in Shinydocs Pro for analysis and setting up the connection for permission checking of Search results for your source.
Once complete:
-
Your Azure Files source will be analyzed by Shinydocs Pro
-
Files are immediately searchable via Search, enforcing Azure Files permissions on all search results.
Requirements
-
Shinydocs Pro is installed and running.
-
Internet access to reach Microsoft Online
-
If the server cannot have direct internet access, ensure firewall rules are setup to allow HTTPS traffic on port 443
-
-
Azure/Entra permission to:
-
Create application registrations
-
Grant admin consent
-
Permission to see and modify your storage account
-
-
A certificate used to authenticate (Azure requires the .cer and Shinydocs Pro requires the .pfx)
Create the self signed certificate for Azure
If you already have a process internally for creating these certificates, please follow your organizations best practices. If not, you can use the script below.
Step 1 - Register Shinydocs Software with Azure
The first step of the process is to register your Shinydocs software with Azure, so that it can access Azure Files data.
You only need to register one application for Shinydocs software. Permissions to supported repositories can be configured the one registration.
-
Open Microsoft Azure.
-
In the upper left corner dropdown menu, navigate to Azure Active Directory.
-
From the sidebar menu, select App registrations
-
Select + New registration
-
Enter a name for the application. In this case, we used “Shinydocs Pro” as the application name.
-
Select who, within your organization, can use or access the application. In most cases, the first option (Single tenant) will be selected (see below).
-
The optional Redirect URl is not needed in this case.
-
Select Register to continue.
Upload Authentication Certificate to Azure
These steps require a .cer file.
-
From the sidebar menu, select Certificates & secrets
-
Select Certificates
-
Select Upload certificate
-
Select the folder icon to browse for your certificate (.cer). Optionally, add a description to let other administrators know what this certificate is used for.
-
Select Add
-
Verify that the certificate was uploaded successfully by confirming the certificate is shown Certificates
-
Still in Certificates & secrets, click the Client secrets tab.
-
Click + New client secret
-
In the Add a client secret panel, add a description of your choice
-
Set it to expire in 12 months or longer.
This is a good time to schedule a reminder for the expiry, as Shinydocs Pro will also need the new secret key when this one expires. -
Click Add.
-
Copy the secret key to a safe location, as you will not be able to retrieve it later.
-
-
In the left-hand menu, open Overview
-
Note/save the following information for configuring Shinydocs Pro in later steps.
- Application (client) ID: ___________________________________________________
- Directory (tenant) ID: ___________________________________________________
- Secret key: ___________________________________________________
Authentication
Still in the Azure portal Shinydocs application registration, now you will set up the redirect URIs for authentication.
-
Navigate to the Authentication tab in the application registration
-
Web > Redirect URIs
-
This set up will be for the server running Shinydocs Pro Search using it’s hostname. You can update these settings later when/if you set up your fully qualified domain name in your DNS.
-
Redirect URIs (Web platform):
-
https://<shinydocs pro server host name>:9701/oauth/authorized-
e.g.
https://shinyvm:9701/oauth/authorized -
If users reach Control Center by its full domain name, add that as well, e.g.
https://shinyvm.contoso.com:9701/oauth/authorized
-
-
https://localhost:9701/oauth/authorized
Each URI must exactly match the source’s Redirect URL with
/oauth/authorizedadded. Include the port, unless your DNS or proxy removes it. -
-
Step 2 - Assign the Roles to the Service Principal
When an application registration is performed in Azure, a Service Principal is automatically created for it. In this step, you will be assigning the appropriate roles for it to access Azure Files.
-
In the Azure portal, navigate to the Storage account section in your tenant
-
Select Access Control (IAM) from the sidebar.
-
Click Add, then select Add role assignment.
-
Search for and select one or both depending on what you want Shinydocs Pro to be able to do:
-
Storage File Data Privileged Contributor
You want to analyze your content and action it (i.e. disposal) -
Storage File Data Privileged Reader
You only want to analyze data and not action it (i.e. disposal)
-
-
Under Members, select User, group, or service principal.
-
Search for and select your Shinydocs App Registration by name.
-
Click Review + assign.
Step 3 - Azure API Permissions Configuration (for Search functionality)
Now that the Shinydocs Application has been registered with Azure, it’s time to apply permissions to access content within Azure Files.
-
From the sidebar menu, select API permissions
-
Select + Add a permission
-
Select Microsoft Graph:
-
Then, select Delegated permissions
-
Add the following delegated permissions
-
User.Read
Type:Delegated -
offline_acccess
Type:Delegated -
openid
Type:Delegated -
profile
Type:Delegated
-
-
Click Add permissions
-
Select + Add a permission again
-
Select APIs my organization uses and search for Azure Storage
-
Then, select Delegated permissions and check the box for user_impersonation
-
Click add permissions.
-
Select Grant admin consent for [tenant], confirm when prompted
Step 4 - Add your Azure Files source in Shinydocs Pro Control Center
You need the .pfx certificate file you created earlier.
-
In Shinydocs Pro Control Center, select Add source. It is on the Overview page and the Sources page.
-
On the New tab, select Azure Files, then select Next. To add another source to a Azure Files connection you already set up, use the Existing tab instead.
-
Fill out the form with the details from your app registration:
-
Connection name: leave as is, or enter a name of your own.
-
Service Uri: replace
storageAccountNamewith the name of your Azure storage account, for examplehttps://azslfiletest.file.core.windows.net. -
Share Name: the name of the Azure file share you want to analyze.
-
Application ID: the Application (client) ID you noted.
-
Tenant ID: the Directory (tenant) ID you noted.
-
Certificate file: select Choose File and upload your .pfx file. The certificate is stored with the connection, so moving the file afterwards doesn’t affect it.
-
Certificate password (optional): the password for the .pfx file. Leave it blank if the file has no password.
-
Search Authentication Type: select Protected - OAuth2, then fill in:
-
Client Id: the Application (client) ID from your app registration.
-
Client Secret: the client secret from your app registration.
-
Login/Authorize Endpoint and Token Endpoint: replace
commonwith your Tenant ID, for examplehttps://login.microsoftonline.com/<tenant-id>/oauth2/v2.0/authorizeand.../oauth2/v2.0/token. -
Redirect URL: the address users reach Shinydocs Search on, as domain and port only, for example
https://search.contoso.com:9701.https://localhost:9701works for testing on the server itself./oauth/authorizedis added automatically. This URL with/oauth/authorizedmust match a redirect URI on the app registration in Microsoft Entra ID exactly.
-
-
-
Select Next. Control Center checks the connection before you continue. If something is wrong, the error says which setting to fix. A source can only be added while an agent is online.
-
Choose the scope of the analysis. Enter the folder path exactly as it appears in your file share, relative to the share root. Use a forward slash ( / ) to separate nested folders, and don’t include the share name or a leading slash.
Paths are case-sensitive. If a path is not found, you see an error before the crawl begins. Select Add for another folder, or Add multiple to paste several paths, one per line. Each path is crawled as its own root, and only those folders (and their subfolders) are indexed. If two folders share a name in different locations, use the full path.
-
Optionally, select More options to set the Schedule (Daily or None), then select Return.
-
Select Start analysis.
The new source runs the analysis set for Azure Files connections under Settings > Analysis. To change what runs for this source, or its schedule, open it from the Sources page. See Shinydocs Pro Control Center Guide.
Before publishing: Step 1 > Authentication lists the redirect URIs /azuread/success and /api/v1/oidc/signin-callback, but Protected - OAuth2 search sign-in uses <Redirect URL>/oauth/authorized (with the port). Add that URI to Step 1, as on the Microsoft sources page.