About This Page
This page is part of the Azure documentation. It contains code examples and configuration instructions for working with Azure services.
Bias Analysis
Bias Types:
⚠️
windows_first
⚠️
missing_linux_example
⚠️
windows_tools
Summary:
The documentation exhibits a Windows bias by consistently referencing Windows environments first or exclusively, especially in prerequisites and sample instructions. Several steps explicitly instruct users to use a Windows command prompt, and some certificate creation links and instructions default to Windows-specific tabs or tools. There are missing or unclear instructions for Linux users, particularly regarding command-line environments and tool usage. While some sections mention Linux compatibility, practical Linux-specific guidance is lacking.
Recommendations:
- For all command-line instructions (e.g., creating projects, running samples), provide both Windows (cmd/PowerShell) and Linux/macOS (bash/sh) equivalents, or clarify when commands are cross-platform.
- In prerequisites, avoid specifying 'Windows-based machine' unless truly required. Instead, list requirements for both Windows and Linux/macOS, and clarify when steps differ.
- When linking to certificate creation tutorials, ensure that both Windows and Linux tabs are referenced or provide a neutral link, not just the Windows tab.
- In sample creation steps, avoid phrases like 'Open a Windows command prompt.' Instead, use 'Open a terminal window' and specify differences if necessary.
- For Java and Node.js sections, clarify that the samples can be run on Linux/macOS as well, and provide any necessary adjustments (e.g., path syntax, shell commands).
- Where Git Bash or similar tools are referenced, explain their relevance for both Windows and Linux users, and suggest native alternatives for Linux.
- Add explicit Linux/macOS examples for certificate manipulation (e.g., using openssl, sed, etc.), and clarify any OS-specific nuances.
- Review all screenshots and UI instructions to ensure they are not Windows-specific, or provide Linux/macOS equivalents where the Azure portal UI differs.
Create pull request
Flagged Code Snippets
Copy and paste the output certificate text for the constant value.
> [!IMPORTANT]
> In production code, be aware of the following security considerations:
>
> * Hard-coding the connection string for the provisioning service administrator is against security best practices. Instead, the connection string should be held in a secure manner, such as in a secure configuration file or in the registry.
> * Be sure to upload only the public part of the signing certificate. Never upload .pfx (PKCS12) or .pem files containing private keys to the provisioning service.
1. The sample allows you to set an IoT hub in the enrollment group to provision the device to. This must be an IoT hub that was previously linked to the provisioning service. For this article, we let DPS choose from the linked hubs according to the default allocation policy, evenly weighted distribution. Comment out the following statement in the file:
2. Upon successful creation, the command window displays the properties of the new enrollment group.
:::zone-end
:::zone pivot="programming-language-nodejs"
1. Run the following command in your command prompt. Include the quotes around the command arguments and replace `<connection string>` with connection string you copied in the previous section, and `<certificate .pem file>` with the path to your certificate `.pem` file. This file represents the public part of a either a root CA X.509 certificate that was previously uploaded and verified with your provisioning service, or an intermediate certificate that was uploaded and verified or had a certificate in its signing chain uploaded and verified.
2. Upon successful creation, the command window displays the properties of the new enrollment group.
:::zone-end
:::zone pivot="programming-language-java"
1. From the *azure-iot-sdk-java\provisioning\provisioning-service-client-samples\service-enrollment-group-sample* folder in your command prompt, run the following command to build the sample:
private static string ProvisioningConnectionString = "{ProvisioningServiceConnectionString}";
private static string EnrollmentGroupId = "enrollmentgrouptest";
private static string X509RootCertPath = @"{Path to a .cer or .pem file for a verified root CA or intermediate CA X.509 certificate}";