Home

Does anyone know how to set companyName via AzureAD PoSH module?

%3CLINGO-SUB%20id%3D%22lingo-sub-193885%22%20slang%3D%22en-US%22%3EDoes%20anyone%20know%20how%20to%20set%20companyName%20via%20AzureAD%20PoSH%20module%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-193885%22%20slang%3D%22en-US%22%3E%3CP%3EI'm%20assuming%20set-azureaduser%20would%20be%20the%20correct%20cmdlet%20to%20use.%20If%20that%20is%20the%20case%2C%20the%20documentation%20doesn't%20have%20any%20examples%20of%20how%20to%20populate%20attributes%20such%20as%20companyName.%20I'm%20able%20to%20select%26nbsp%3Battributes%20with%20the%20following%20syntax%3A%26nbsp%3BGet-AzureADUserExtension%20-ObjectId%20%24UserId%20%7C%20select%20ExtensionProperty%26nbsp%3B%20%7C%20ConvertTo-Json%20or%26nbsp%3B(Get-AzureADUser%20-ObjectId%20%22user%40domain.com%22).toJSon().%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIs%20this%20attribute%20still%20read-only%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-193885%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAzure%20AD%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-193998%22%20slang%3D%22en-US%22%3ERe%3A%20Does%20anyone%20know%20how%20to%20set%20companyName%20via%20AzureAD%20PoSH%20module%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-193998%22%20slang%3D%22en-US%22%3E%3CP%3EThat%20property%20is%20only%20configurable%20via%20the%20Exchange%20tools%20afaik%2C%20so%26nbsp%3Byou%20need%20to%20use%26nbsp%3BSet-User%20instead%26nbsp%3B(or%20you%20can%20sync%20it%20from%20AD).%3C%2FP%3E%3C%2FLINGO-BODY%3E
Stephen Leuthold
Occasional Contributor

I'm assuming set-azureaduser would be the correct cmdlet to use. If that is the case, the documentation doesn't have any examples of how to populate attributes such as companyName. I'm able to select attributes with the following syntax: Get-AzureADUserExtension -ObjectId $UserId | select ExtensionProperty  | ConvertTo-Json or (Get-AzureADUser -ObjectId "user@domain.com").toJSon().

 

Is this attribute still read-only?

 

Thank you!

1 Reply

That property is only configurable via the Exchange tools afaik, so you need to use Set-User instead (or you can sync it from AD).

Related Conversations
Extentions Synchronization
Deleted in Discussions on
3 Replies
Tabs and Dark Mode
cjc2112 in Discussions on
35 Replies
Stable version of Edge insider browser
HotCakeX in Discussions on
35 Replies
Security Community Webinars
Valon_Kolica in Security, Privacy & Compliance on
9 Replies