Skip to content

Commit 4b75eac

Browse files
authored
[synapse] Fix AccessControl LIVE sample test (#18606)
1 parent 18f3d80 commit 4b75eac

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

sdk/synapse/Azure.Analytics.Synapse.AccessControl/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -99,13 +99,13 @@ First, you need to the determine the ID of the role you wish to assign, along wi
9999

100100
```C# Snippet:PrepCreateRoleAssignment
101101
Response<IReadOnlyList<SynapseRoleDefinition>> roles = definitionsClient.ListRoleDefinitions();
102-
SynapseRoleDefinition role = roles.Value.Single(role => role.Name == "Workspace Admin");
102+
SynapseRoleDefinition role = roles.Value.Single(role => role.Name == "Synapse Administrator");
103103
Guid roleId = role.Id.Value;
104104

105105
string assignedScope = "workspaces/<my-workspace-name>";
106106

107107
// Replace the string below with the ID you'd like to assign the role.
108-
Guid principalId = Guid.Parse("<my-principal-id>");
108+
Guid principalId = /*<my-principal-id>"*/ Guid.NewGuid();
109109

110110
// Replace the string below with the ID of the assignment you'd like to use.
111111
string assignmentId = "<my-assignment-id>";

sdk/synapse/Azure.Analytics.Synapse.AccessControl/samples/Sample1_HelloWorld.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ First, you need to the determine the ID of the role you wish to assign, along wi
2020

2121
```C# Snippet:PrepCreateRoleAssignment
2222
Response<IReadOnlyList<SynapseRoleDefinition>> roles = definitionsClient.ListRoleDefinitions();
23-
SynapseRoleDefinition role = roles.Value.Single(role => role.Name == "Workspace Admin");
23+
SynapseRoleDefinition role = roles.Value.Single(role => role.Name == "Synapse Administrator");
2424
Guid roleId = role.Id.Value;
2525

2626
string assignedScope = "workspaces/<my-workspace-name>";
2727

2828
// Replace the string below with the ID you'd like to assign the role.
29-
Guid principalId = Guid.Parse("<my-principal-id>");
29+
Guid principalId = /*<my-principal-id>"*/ Guid.NewGuid();
3030

3131
// Replace the string below with the ID of the assignment you'd like to use.
3232
string assignmentId = "<my-assignment-id>";

sdk/synapse/Azure.Analytics.Synapse.AccessControl/tests/samples/Sample1_HelloWorld.cs

+2-3
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,14 @@ public void AddAndRemoveRoleAssignmentSync()
3333

3434
#region Snippet:PrepCreateRoleAssignment
3535
Response<IReadOnlyList<SynapseRoleDefinition>> roles = definitionsClient.ListRoleDefinitions();
36-
SynapseRoleDefinition role = roles.Value.Single(role => role.Name == "Workspace Admin");
36+
SynapseRoleDefinition role = roles.Value.Single(role => role.Name == "Synapse Administrator");
3737
Guid roleId = role.Id.Value;
3838

3939
string assignedScope = "workspaces/<my-workspace-name>";
4040
/*@@*/assignedScope = "workspaces/workspacechhamosynapse";
4141

4242
// Replace the string below with the ID you'd like to assign the role.
43-
Guid principalId = Guid.Parse("<my-principal-id>");
44-
/*@@*/principalId = Guid.NewGuid();
43+
Guid principalId = /*<my-principal-id>"*/ Guid.NewGuid();
4544

4645
// Replace the string below with the ID of the assignment you'd like to use.
4746
string assignmentId = "<my-assignment-id>";

0 commit comments

Comments
 (0)