Skip to content

Commit 708fb92

Browse files
committed
Graph: Add the includeDirectoryObjectReferences flag to the GetObjectsByObjectIds call that also searches for object ids in the partner tenant (artemis/CSP scenario)
1 parent 8d44f81 commit 708fb92

File tree

5 files changed

+9
-8
lines changed

5 files changed

+9
-8
lines changed

src/ResourceManager/Resources/Commands.Resources.Test/Commands.Resources.Test.csproj

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,9 @@
6060
<Reference Include="Microsoft.Azure.Gallery">
6161
<HintPath>..\..\..\packages\Microsoft.Azure.Gallery.2.6.2-preview\lib\net40\Microsoft.Azure.Gallery.dll</HintPath>
6262
</Reference>
63-
<Reference Include="Microsoft.Azure.Graph.RBAC">
63+
<Reference Include="Microsoft.Azure.Graph.RBAC, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
6464
<SpecificVersion>False</SpecificVersion>
65-
<HintPath>..\..\..\packages\Microsoft.Azure.Graph.RBAC.1.7.1-preview\lib\net40\Microsoft.Azure.Graph.RBAC.dll</HintPath>
65+
<HintPath>..\..\..\packages\Microsoft.Azure.Graph.RBAC.1.7.2-preview\lib\net40\Microsoft.Azure.Graph.RBAC.dll</HintPath>
6666
</Reference>
6767
<Reference Include="Microsoft.Azure.Insights">
6868
<HintPath>..\..\..\packages\Microsoft.Azure.Insights.0.7.7-preview\lib\net45\Microsoft.Azure.Insights.dll</HintPath>
@@ -245,6 +245,7 @@
245245
</ProjectReference>
246246
</ItemGroup>
247247
<ItemGroup>
248+
<None Include="app.config" />
248249
<None Include="SamplePolicyDefinition.json">
249250
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
250251
</None>
@@ -551,4 +552,4 @@
551552
<ItemGroup />
552553
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
553554
<Import Project="..\..\..\packages\Microsoft.Bcl.Build.1.0.14\tools\Microsoft.Bcl.Build.targets" Condition="Exists('..\..\..\packages\Microsoft.Bcl.Build.1.0.14\tools\Microsoft.Bcl.Build.targets')" />
554-
</Project>
555+
</Project>

src/ResourceManager/Resources/Commands.Resources.Test/packages.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<package id="Microsoft.Azure.Common.Authentication" version="1.3.3-preview" targetFramework="net45" />
66
<package id="Microsoft.Azure.Common.Dependencies" version="1.0.0" targetFramework="net45" />
77
<package id="Microsoft.Azure.Gallery" version="2.6.2-preview" targetFramework="net45" />
8-
<package id="Microsoft.Azure.Graph.RBAC" version="1.7.0-preview" targetFramework="net45" />
8+
<package id="Microsoft.Azure.Graph.RBAC" version="1.7.2-preview" targetFramework="net45" />
99
<package id="Microsoft.Azure.Insights" version="0.7.7-preview" targetFramework="net45" />
1010
<package id="Microsoft.Azure.KeyVault.Core" version="1.0.0" targetFramework="net45" />
1111
<package id="Microsoft.Azure.Management.Authorization" version="1.0.0" targetFramework="net45" />

src/ResourceManager/Resources/Commands.Resources/Commands.Resources.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,9 @@
6464
<Reference Include="Microsoft.Azure.Gallery">
6565
<HintPath>..\..\..\packages\Microsoft.Azure.Gallery.2.6.2-preview\lib\net40\Microsoft.Azure.Gallery.dll</HintPath>
6666
</Reference>
67-
<Reference Include="Microsoft.Azure.Graph.RBAC">
67+
<Reference Include="Microsoft.Azure.Graph.RBAC, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
6868
<SpecificVersion>False</SpecificVersion>
69-
<HintPath>..\..\..\packages\Microsoft.Azure.Graph.RBAC.1.7.1-preview\lib\net40\Microsoft.Azure.Graph.RBAC.dll</HintPath>
69+
<HintPath>..\..\..\packages\Microsoft.Azure.Graph.RBAC.1.7.2-preview\lib\net40\Microsoft.Azure.Graph.RBAC.dll</HintPath>
7070
</Reference>
7171
<Reference Include="Microsoft.Azure.Management.Authorization">
7272
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Authorization.1.0.1\lib\net40\Microsoft.Azure.Management.Authorization.dll</HintPath>

src/ResourceManager/Resources/Commands.Resources/Models.ActiveDirectory/ActiveDirectoryClient.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ public List<PSADObject> ListUserGroups(string principal)
228228
public List<PSADObject> GetObjectsByObjectId(List<string> objectIds)
229229
{
230230
List<PSADObject> result = new List<PSADObject>();
231-
var adObjects = GraphClient.Objects.GetObjectsByObjectIds(new GetObjectsParameters { Ids = objectIds }).AADObject;
231+
var adObjects = GraphClient.Objects.GetObjectsByObjectIds(new GetObjectsParameters { Ids = objectIds, IncludeDirectoryObjectReferences = true }).AADObject;
232232
result.AddRange(adObjects.Select(o => o.ToPSADObject()));
233233
return result;
234234
}

src/ResourceManager/Resources/Commands.Resources/packages.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<package id="Microsoft.Azure.Common.Authentication" version="1.3.3-preview" targetFramework="net45" />
66
<package id="Microsoft.Azure.Common.Dependencies" version="1.0.0" targetFramework="net45" />
77
<package id="Microsoft.Azure.Gallery" version="2.6.2-preview" targetFramework="net45" />
8-
<package id="Microsoft.Azure.Graph.RBAC" version="1.7.1-preview" targetFramework="net45" />
8+
<package id="Microsoft.Azure.Graph.RBAC" version="1.7.2-preview" targetFramework="net45" />
99
<package id="Microsoft.Azure.Management.Authorization" version="1.0.1" targetFramework="net45" />
1010
<package id="Microsoft.Azure.Management.Resources" version="2.18.11-preview" targetFramework="net45" />
1111
<package id="Microsoft.Bcl" version="1.1.10" targetFramework="net45" />

0 commit comments

Comments
 (0)