Skip to content

Corrected parameter for New-AzureADApplicationKeyCredential sample #170

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from Jan 4, 2018
Merged

Corrected parameter for New-AzureADApplicationKeyCredential sample #170

merged 1 commit into from Jan 4, 2018

Conversation

ghost
Copy link

@ghost ghost commented Jan 4, 2018

Certificate example for the New-AzureADApplicationKeyCredential cmdlet had incorrect syntax. It was

PS C:> New-AzureADApplicationKeyCredential -ObjectId 009d786a-3503-4217-b8ab-db03d71c179a -CustomKeyIdentifier $base64Thumbprint -Type AsymmetricX509Cert -Usage Verify -Value $base64Value -StartDate $cer.GetEffectiveDateString() -EndDate cer.GetExpirationDateString()

and it should be

PS C:> New-AzureADApplicationKeyCredential -ObjectId 009d786a-3503-4217-b8ab-db03d71c179a -CustomKeyIdentifier $base64Thumbprint -Type AsymmetricX509Cert -Usage Verify -Value $base64Value -StartDate $cer.GetEffectiveDateString() -EndDate $cer.GetExpirationDateString()

@ghost
Copy link

ghost commented Jan 4, 2018

❌ Validation status: errors

File Status Preview URL Details
❌Error Details
❌Error Details

  • [Error] System.IO.FileLoadException: Could not load file or assembly 'YamlDotNet, Version=4.1.0.0, Culture=neutral, PublicKeyToken=ec19458f3c15af5e' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
    File name: 'YamlDotNet, Version=4.1.0.0, Culture=neutral, PublicKeyToken=ec19458f3c15af5e'
    at System.ModuleHandle.ResolveType(RuntimeModule module, Int32 typeToken, IntPtr* typeInstArgs, Int32 typeInstCount, IntPtr* methodInstArgs, Int32 methodInstCount, ObjectHandleOnStack type)
    at System.ModuleHandle.ResolveTypeHandleInternal(RuntimeModule module, Int32 typeToken, RuntimeTypeHandle[] typeInstantiationContext, RuntimeTypeHandle[] methodInstantiationContext)
    at System.Reflection.RuntimeModule.ResolveType(Int32 metadataToken, Type[] genericTypeArguments, Type[] genericMethodArguments)
    at System.Reflection.CustomAttribute.FilterCustomAttributeRecord(CustomAttributeRecord caRecord, MetadataImport scope, Assembly& lastAptcaOkAssembly, RuntimeModule decoratedModule, MetadataToken decoratedToken, RuntimeType attributeFilterType, Boolean mustBeInheritable, Object[] attributes, IList derivedAttributes, RuntimeType& attributeType, IRuntimeMethodInfo& ctor, Boolean& ctorHasParameters, Boolean& isVarArg)
    at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeModule decoratedModule, Int32 decoratedMetadataToken, Int32 pcaCount, RuntimeType attributeFilterType, Boolean mustBeInheritable, IList derivedAttributes, Boolean isDecoratedTargetSecurityTransparent)
    at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimePropertyInfo property, RuntimeType caType)
    at System.Attribute.InternalGetCustomAttributes(PropertyInfo element, Type type, Boolean inherit)
    at System.Composition.TypedParts.Util.DirectAttributeContext.GetCustomAttributes(Type reflectedType, MemberInfo member)
    at System.Composition.TypedParts.Discovery.TypeInspector.<DiscoverPropertyExports>d__7.MoveNext()
    at System.Composition.TypedParts.Discovery.TypeInspector.<DiscoverExports>d__5.MoveNext()
    at System.Composition.TypedParts.Discovery.TypeInspector.InspectTypeForPart(TypeInfo type, DiscoveredPart& part)
    at System.Composition.TypedParts.TypedPartExportDescriptorProvider..ctor(IEnumerable1 types, AttributedModelProvider attributeContext) at System.Composition.Hosting.ContainerConfiguration.CreateContainer() at Microsoft.DocAsCode.Common.CompositionContainer.GetContainer(IEnumerable1 assemblies)
    at Microsoft.DocAsCode.Build.Engine.DocumentBuilder..ctor(IEnumerable1 assemblies, ImmutableArray1 postProcessorNames, String templateHash, String intermediateFolder, String commitFromSHA, String commitToSHA, Boolean cleanupCacheHistory)
    at Microsoft.DocAsCode.SubCommands.DocumentBuilderWrapper.BuildDocument(BuildJsonConfig config, TemplateManager templateManager, String baseDirectory, String outputDirectory, String pluginDirectory, String templateDirectory)
    at Microsoft.DocAsCode.SubCommands.DocumentBuilderWrapper.BuildDocument()

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

  • Line 108: [Warning] Restore nuget package W:\tixi-s.optemp\dependentPackages\Microsoft.OpenPublishing.CommonPlugins\packages.config in folder:W:\tixi-s.optemp\packages failed, possibly due to transient errors from nuget servers. Please retry building your content. If the issue still happens, open a ticket in http://SiteHelp. Detailed error: Unable to find version '1.0.103' of package 'Microsoft.OpenPublishing.CommonPlugins'.
  • Line 152: [Warning] Cannot find local script file W:\tixi-s_dependentPackages\CommonPlugins\tools\PowerShellReference.ps1

  • [Error] System.IO.FileLoadException: Could not load file or assembly 'YamlDotNet, Version=4.1.0.0, Culture=neutral, PublicKeyToken=ec19458f3c15af5e' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
    File name: 'YamlDotNet, Version=4.1.0.0, Culture=neutral, PublicKeyToken=ec19458f3c15af5e'
    at System.ModuleHandle.ResolveType(RuntimeModule module, Int32 typeToken, IntPtr* typeInstArgs, Int32 typeInstCount, IntPtr* methodInstArgs, Int32 methodInstCount, ObjectHandleOnStack type)
    at System.ModuleHandle.ResolveTypeHandleInternal(RuntimeModule module, Int32 typeToken, RuntimeTypeHandle[] typeInstantiationContext, RuntimeTypeHandle[] methodInstantiationContext)
    at System.Reflection.RuntimeModule.ResolveType(Int32 metadataToken, Type[] genericTypeArguments, Type[] genericMethodArguments)
    at System.Reflection.CustomAttribute.FilterCustomAttributeRecord(CustomAttributeRecord caRecord, MetadataImport scope, Assembly& lastAptcaOkAssembly, RuntimeModule decoratedModule, MetadataToken decoratedToken, RuntimeType attributeFilterType, Boolean mustBeInheritable, Object[] attributes, IList derivedAttributes, RuntimeType& attributeType, IRuntimeMethodInfo& ctor, Boolean& ctorHasParameters, Boolean& isVarArg)
    at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeModule decoratedModule, Int32 decoratedMetadataToken, Int32 pcaCount, RuntimeType attributeFilterType, Boolean mustBeInheritable, IList derivedAttributes, Boolean isDecoratedTargetSecurityTransparent)
    at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimePropertyInfo property, RuntimeType caType)
    at System.Attribute.InternalGetCustomAttributes(PropertyInfo element, Type type, Boolean inherit)
    at System.Composition.TypedParts.Util.DirectAttributeContext.GetCustomAttributes(Type reflectedType, MemberInfo member)
    at System.Composition.TypedParts.Discovery.TypeInspector.<DiscoverPropertyExports>d__7.MoveNext()
    at System.Composition.TypedParts.Discovery.TypeInspector.<DiscoverExports>d__5.MoveNext()
    at System.Composition.TypedParts.Discovery.TypeInspector.InspectTypeForPart(TypeInfo type, DiscoveredPart& part)
    at System.Composition.TypedParts.TypedPartExportDescriptorProvider..ctor(IEnumerable1 types, AttributedModelProvider attributeContext) at System.Composition.Hosting.ContainerConfiguration.CreateContainer() at Microsoft.DocAsCode.Common.CompositionContainer.GetContainer(IEnumerable1 assemblies)
    at Microsoft.DocAsCode.Build.Engine.DocumentBuilder..ctor(IEnumerable1 assemblies, ImmutableArray1 postProcessorNames, String templateHash, String intermediateFolder, String commitFromSHA, String commitToSHA, Boolean cleanupCacheHistory)
    at Microsoft.DocAsCode.SubCommands.DocumentBuilderWrapper.BuildDocument(BuildJsonConfig config, TemplateManager templateManager, String baseDirectory, String outputDirectory, String pluginDirectory, String templateDirectory)
    at Microsoft.DocAsCode.SubCommands.DocumentBuilderWrapper.BuildDocument()

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

  • Line 108: [Warning] Restore nuget package W:\tixi-s.optemp\dependentPackages\Microsoft.OpenPublishing.CommonPlugins\packages.config in folder:W:\tixi-s.optemp\packages failed, possibly due to transient errors from nuget servers. Please retry building your content. If the issue still happens, open a ticket in http://SiteHelp. Detailed error: Unable to find version '1.0.103' of package 'Microsoft.OpenPublishing.CommonPlugins'.
  • Line 152: [Warning] Cannot find local script file W:\tixi-s_dependentPackages\CommonPlugins\tools\PowerShellReference.ps1

For more details, please refer to the build report.

Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.

@TaraMeyer TaraMeyer closed this Jan 4, 2018
@TaraMeyer TaraMeyer reopened this Jan 4, 2018
@ghost
Copy link

ghost commented Jan 4, 2018

❌ Validation status: errors

File Status Preview URL Details
❌Error Details

  • [Error] System.IO.FileLoadException: Could not load file or assembly 'YamlDotNet, Version=4.1.0.0, Culture=neutral, PublicKeyToken=ec19458f3c15af5e' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
    File name: 'YamlDotNet, Version=4.1.0.0, Culture=neutral, PublicKeyToken=ec19458f3c15af5e'
    at System.ModuleHandle.ResolveType(RuntimeModule module, Int32 typeToken, IntPtr* typeInstArgs, Int32 typeInstCount, IntPtr* methodInstArgs, Int32 methodInstCount, ObjectHandleOnStack type)
    at System.ModuleHandle.ResolveTypeHandleInternal(RuntimeModule module, Int32 typeToken, RuntimeTypeHandle[] typeInstantiationContext, RuntimeTypeHandle[] methodInstantiationContext)
    at System.Reflection.RuntimeModule.ResolveType(Int32 metadataToken, Type[] genericTypeArguments, Type[] genericMethodArguments)
    at System.Reflection.CustomAttribute.FilterCustomAttributeRecord(CustomAttributeRecord caRecord, MetadataImport scope, Assembly& lastAptcaOkAssembly, RuntimeModule decoratedModule, MetadataToken decoratedToken, RuntimeType attributeFilterType, Boolean mustBeInheritable, Object[] attributes, IList derivedAttributes, RuntimeType& attributeType, IRuntimeMethodInfo& ctor, Boolean& ctorHasParameters, Boolean& isVarArg)
    at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeModule decoratedModule, Int32 decoratedMetadataToken, Int32 pcaCount, RuntimeType attributeFilterType, Boolean mustBeInheritable, IList derivedAttributes, Boolean isDecoratedTargetSecurityTransparent)
    at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimePropertyInfo property, RuntimeType caType)
    at System.Attribute.InternalGetCustomAttributes(PropertyInfo element, Type type, Boolean inherit)
    at System.Composition.TypedParts.Util.DirectAttributeContext.GetCustomAttributes(Type reflectedType, MemberInfo member)
    at System.Composition.TypedParts.Discovery.TypeInspector.<DiscoverPropertyExports>d__7.MoveNext()
    at System.Composition.TypedParts.Discovery.TypeInspector.<DiscoverExports>d__5.MoveNext()
    at System.Composition.TypedParts.Discovery.TypeInspector.InspectTypeForPart(TypeInfo type, DiscoveredPart& part)
    at System.Composition.TypedParts.TypedPartExportDescriptorProvider..ctor(IEnumerable1 types, AttributedModelProvider attributeContext) at System.Composition.Hosting.ContainerConfiguration.CreateContainer() at Microsoft.DocAsCode.Common.CompositionContainer.GetContainer(IEnumerable1 assemblies)
    at Microsoft.DocAsCode.Build.Engine.DocumentBuilder..ctor(IEnumerable1 assemblies, ImmutableArray1 postProcessorNames, String templateHash, String intermediateFolder, String commitFromSHA, String commitToSHA, Boolean cleanupCacheHistory)
    at Microsoft.DocAsCode.SubCommands.DocumentBuilderWrapper.BuildDocument(BuildJsonConfig config, TemplateManager templateManager, String baseDirectory, String outputDirectory, String pluginDirectory, String templateDirectory)
    at Microsoft.DocAsCode.SubCommands.DocumentBuilderWrapper.BuildDocument()

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

  • Line 108: [Warning] Restore nuget package W:\yauu-s.optemp\dependentPackages\Microsoft.OpenPublishing.CommonPlugins\packages.config in folder:W:\yauu-s.optemp\packages failed, possibly due to transient errors from nuget servers. Please retry building your content. If the issue still happens, open a ticket in http://SiteHelp. Detailed error: Unable to find version '1.0.103' of package 'Microsoft.OpenPublishing.CommonPlugins'.
  • Line 152: [Warning] Cannot find local script file W:\yauu-s_dependentPackages\CommonPlugins\tools\PowerShellReference.ps1

For more details, please refer to the build report.

Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.

@TaraMeyer TaraMeyer closed this Jan 4, 2018
@TaraMeyer TaraMeyer reopened this Jan 4, 2018
@ghost
Copy link

ghost commented Jan 4, 2018

✅ Validation status: passed

File Status Preview URL Details
azureadps-2.0-preview/AzureAD/New-AzureADApplicationKeyCredential.md ✅Succeeded
azureadps-2.0/AzureAD/New-AzureADApplicationKeyCredential.md ✅Succeeded

For more details, please refer to the build report.

Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.

@TaraMeyer TaraMeyer merged commit b3f25c7 into Azure:master Jan 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant