Skip to content

Commit 8abab51

Browse files
authored
Merge pull request #58 from microsoftgraph/dkershaw10-doc-updates
Minor changes to the docs
2 parents 1ed44a9 + 0019b97 commit 8abab51

3 files changed

Lines changed: 25 additions & 11 deletions

File tree

22.9 KB
Loading

docs/getting-started.md

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ To use the private preview you'll need to install [Bicep tools](https://learn.mi
77
If you already have the Bicep extension for VS Code (or Visual Studio) make sure that you have the latest version (v0.21.1 or later).
88
Earlier versions do not have the Microsoft Graph Bicep Extension.
99

10-
## Creating a Bicep template
10+
If you are new to [Bicep](https://learn.microsoft.com/azure/azure-resource-manager/bicep/overview?tabs=bicep), we strongly recommend that you start by getting familiar with Bicep by trying out the [Bicep quickstarts](https://learn.microsoft.com//azure/azure-resource-manager/bicep/quickstart-create-bicep-use-visual-studio-code?tabs=CLI) and [Bicep tutorials](https://learn.microsoft.com/azure/azure-resource-manager/bicep/learn-bicep).
11+
12+
## Creating a Bicep template with Microsoft Graph Bicep types
1113

1214
To get the benefit of intellisense and auto-complete for the Microsoft Graph Bicep types, you need to enable some experimental features in the Bicep config. Follow the steps in this [Bicep configuration topic](https://learn.microsoft.com/en-us/azure/azure-resource-manager/bicep/bicep-config), to create a Bicep config file, and add:
1315

@@ -24,19 +26,23 @@ When you create a Bicep template, add the following statement, to make Microsoft
2426
import 'microsoftGraph@1.0.0'
2527
```
2628

27-
Now, when creating a Bicep resource, the available Microsoft.Graph resource types will show up:
29+
Now, when creating a Bicep resource, the available Microsoft.Graph resource types will show up.
30+
31+
![image](./VS%20code%20graph%20types%20in%20bicep.jpg)
2832

29-
* [applications](../generated/microsoftgraph/microsoft.graph/beta/types.md#resource-microsoftgraphapplicationsbeta)
30-
* [servicePrincipals](../generated/microsoftgraph/microsoft.graph/beta/types.md#resource-microsoftgraphserviceprincipalsbeta)
31-
* [groups](../generated/microsoftgraph/microsoft.graph/beta/types.md#resource-microsoftgraphgroupsbeta)
32-
* [appRoleAssignedTo](../generated/microsoftgraph/microsoft.graph/beta/types.md#resource-microsoftgraphapproleassignedtobeta)
33-
* [oauth2PermissionGrants](../generated/microsoftgraph/microsoft.graph/beta/types.md#resource-microsoftgraphoauth2permissiongrantsbeta)
33+
| Bicep type definitions | Microsoft Graph API (beta) reference |
34+
|--------------|-----------|
35+
| [applications](../generated/microsoftgraph/microsoft.graph/beta/types.md#resource-microsoftgraphapplicationsbeta) | [application resource](https://learn.microsoft.com/graph/api/resources/application?view=graph-rest-beta) |
36+
| [servicePrincipals](../generated/microsoftgraph/microsoft.graph/beta/types.md#resource-microsoftgraphserviceprincipalsbeta) | [servicePrincipal resource](https://learn.microsoft.com/graph/api/resources/serviceprincipal?view=graph-rest-beta) |
37+
| [groups](../generated/microsoftgraph/microsoft.graph/beta/types.md#resource-microsoftgraphgroupsbeta) | [group resource](https://learn.microsoft.com/graph/api/resources/group?view=graph-rest-beta) |
38+
| [appRoleAssignedTo](../generated/microsoftgraph/microsoft.graph/beta/types.md#resource-microsoftgraphapproleassignedtobeta) | [appRoleAssignment resource](https://learn.microsoft.com/graph/api/resources/approleassignment?view=graph-rest-beta) |
39+
| [oauth2PermissionGrants](../generated/microsoftgraph/microsoft.graph/beta/types.md#resource-microsoftgraphoauth2permissiongrantsbeta) | [oauth2PermissionGrant resource](https://learn.microsoft.com/graph/api/resources/oauth2permissiongrant?view=graph-rest-beta) |
3440

3541
## Deploying Bicep templates
3642

37-
Bicep templates can be deployed using Azure CLI or PowerShell.
43+
Bicep templates can be deployed using [Azure CLI](https://learn.microsoft.com/cli/azure/install-azure-cli) or [Azure PowerShell](https://learn.microsoft.com/powershell/azure/install-azure-powershell).
3844

39-
Deployment will only work for tenants that have been enrolled to the private preview.
45+
> **NOTE**: Deployment will only work for tenants that have been enrolled to the private preview.
4046
4147
## Next steps
4248

@@ -47,4 +53,4 @@ We've created some quick-start templates to get you started.
4753
3. [Create a security group with owners and members](../quickstart-templates/security-group-create-with-owners-and-members/)
4854
4. [Assign an Azure role to a security group](../quickstart-templates/security-group-assign-azure-role/)
4955

50-
Feel free to contribute and share your own samples too!
56+
Feel free to contribute and share your own samples too, by creating some PRs for template examples!

quickstart-templates/application-serviceprincipal-create-client-resource/README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,15 @@
22

33
This template allows you to create a client application and a resource application, along with their service principals.
44

5-
* The client application is created with an optional key credential. The key can be passed in as a parameter. [Get The Certificate Key](https://learn.microsoft.com/en-us/graph/applications-how-to-add-certificate?tabs=http#get-the-certificate-key) mentions the steps to get the certificate key
5+
* The client application is created with an optional key credential. The key can be passed in as a parameter. [Get The Certificate Key](https://learn.microsoft.com/en-us/graph/applications-how-to-add-certificate?tabs=http#get-the-certificate-key) mentions the steps to get the certificate key for a self-signed certificate. Here's a basic script:
6+
7+
```powershell
8+
$certname = "AppRegTestCert"
9+
$cert = New-SelfSignedCertificate -Subject "CN=$certname" -CertStoreLocation "Cert:\CurrentUser\My" -KeyExportPolicy Exportable -KeySpec Signature -KeyLength 2048 -KeyAlgorithm RSA -HashAlgorithm SHA256
10+
Export-Certificate -Cert $cert -FilePath "$certname.cer" // Exports PUBLIC cert
11+
[convert]::ToBase64String((Get-Content "$certname.cer" -Encoding byte)) | Out-File -FilePath "20231004.$certname.txt"
12+
```
13+
614
* The resource application is created with an optional app role. The id for the app role can be passed in as a parameter.
715

816
You can deploy the template with the following Azure CLI command (replace `<resource-group>`, `<app-role-id>` and `<cert-key>` with the necessary values for your deployment):

0 commit comments

Comments
 (0)